* Delete all nodes for a file
(filePath: string)
| 1099 | * Delete all nodes for a file |
| 1100 | */ |
| 1101 | deleteNodesByFile(filePath: string): void { |
| 1102 | if (!this.stmts.deleteNodesByFile) { |
| 1103 | this.stmts.deleteNodesByFile = this.db.prepare('DELETE FROM nodes WHERE file_path = ?'); |
| 1104 | } |
| 1105 | // Invalidate cache for nodes in this file |
| 1106 | for (const [id, node] of this.nodeCache) { |
| 1107 | if (node.filePath === filePath) { |
| 1108 | this.nodeCache.delete(id); |
| 1109 | } |
| 1110 | } |
| 1111 | this.stmts.deleteNodesByFile.run(filePath); |
| 1112 | } |
| 1113 | |
| 1114 | // =========================================================================== |
| 1115 | // Name-segment vocabulary (prompt-hook graph-derived gate) |
no test coverage detected