* Delete all nodes for a file
(filePath: string)
| 1031 | * Delete all nodes for a file |
| 1032 | */ |
| 1033 | deleteNodesByFile(filePath: string): void { |
| 1034 | if (!this.stmts.deleteNodesByFile) { |
| 1035 | this.stmts.deleteNodesByFile = this.db.prepare('DELETE FROM nodes WHERE file_path = ?'); |
| 1036 | } |
| 1037 | // Invalidate cache for nodes in this file |
| 1038 | for (const [id, node] of this.nodeCache) { |
| 1039 | if (node.filePath === filePath) { |
| 1040 | this.nodeCache.delete(id); |
| 1041 | } |
| 1042 | } |
| 1043 | this.stmts.deleteNodesByFile.run(filePath); |
| 1044 | } |
| 1045 | |
| 1046 | // =========================================================================== |
| 1047 | // Name-segment vocabulary (prompt-hook graph-derived gate) |
no test coverage detected