* Delete a file record and its nodes
(filePath: string)
| 4237 | * Delete a file record and its nodes |
| 4238 | */ |
| 4239 | deleteFile(filePath: string): void { |
| 4240 | this.db.transaction(() => { |
| 4241 | this.deleteNodesByFile(filePath); |
| 4242 | if (!this.stmts.deleteFile) { |
| 4243 | this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?'); |
| 4244 | } |
| 4245 | this.stmts.deleteFile.run(filePath); |
| 4246 | })(); |
| 4247 | } |
| 4248 | |
| 4249 | /** |
| 4250 | * Get a file record by path |
no test coverage detected