* Delete a file record and its nodes
(filePath: string)
| 1484 | * Delete a file record and its nodes |
| 1485 | */ |
| 1486 | deleteFile(filePath: string): void { |
| 1487 | this.db.transaction(() => { |
| 1488 | this.deleteNodesByFile(filePath); |
| 1489 | if (!this.stmts.deleteFile) { |
| 1490 | this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?'); |
| 1491 | } |
| 1492 | this.stmts.deleteFile.run(filePath); |
| 1493 | })(); |
| 1494 | } |
| 1495 | |
| 1496 | /** |
| 1497 | * Get a file record by path |
no test coverage detected