* Delete a file record and its nodes
(filePath: string)
| 2146 | * Delete a file record and its nodes |
| 2147 | */ |
| 2148 | deleteFile(filePath: string): void { |
| 2149 | this.db.transaction(() => { |
| 2150 | this.deleteNodesByFile(filePath); |
| 2151 | if (!this.stmts.deleteFile) { |
| 2152 | this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?'); |
| 2153 | } |
| 2154 | this.stmts.deleteFile.run(filePath); |
| 2155 | })(); |
| 2156 | } |
| 2157 | |
| 2158 | /** |
| 2159 | * Get a file record by path |
no test coverage detected