* Delete a file record and its nodes
(filePath: string)
| 4676 | * Delete a file record and its nodes |
| 4677 | */ |
| 4678 | deleteFile(filePath: string): void { |
| 4679 | this.db.transaction(() => { |
| 4680 | this.deleteNodesByFile(filePath); |
| 4681 | if (!this.stmts.deleteFile) { |
| 4682 | this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?'); |
| 4683 | } |
| 4684 | this.stmts.deleteFile.run(filePath); |
| 4685 | })(); |
| 4686 | } |
| 4687 | |
| 4688 | /** |
| 4689 | * Get a file record by path |
no test coverage detected