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