* Delete a file record and its nodes
(filePath: string)
| 3159 | * Delete a file record and its nodes |
| 3160 | */ |
| 3161 | deleteFile(filePath: string): void { |
| 3162 | this.db.transaction(() => { |
| 3163 | this.deleteNodesByFile(filePath); |
| 3164 | if (!this.stmts.deleteFile) { |
| 3165 | this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?'); |
| 3166 | } |
| 3167 | this.stmts.deleteFile.run(filePath); |
| 3168 | })(); |
| 3169 | } |
| 3170 | |
| 3171 | /** |
| 3172 | * Get a file record by path |
no test coverage detected