* Delete a file record and its nodes
(filePath: string)
| 1894 | * Delete a file record and its nodes |
| 1895 | */ |
| 1896 | deleteFile(filePath: string): void { |
| 1897 | this.db.transaction(() => { |
| 1898 | this.deleteNodesByFile(filePath); |
| 1899 | if (!this.stmts.deleteFile) { |
| 1900 | this.stmts.deleteFile = this.db.prepare('DELETE FROM files WHERE path = ?'); |
| 1901 | } |
| 1902 | this.stmts.deleteFile.run(filePath); |
| 1903 | })(); |
| 1904 | } |
| 1905 | |
| 1906 | /** |
| 1907 | * Get a file record by path |
no test coverage detected