* Delete all nodes for a file
(filePath: string)
| 635 | * Delete all nodes for a file |
| 636 | */ |
| 637 | deleteNodesByFile(filePath: string): void { |
| 638 | if (!this.stmts.deleteNodesByFile) { |
| 639 | this.stmts.deleteNodesByFile = this.db.prepare('DELETE FROM nodes WHERE file_path = ?'); |
| 640 | } |
| 641 | // Invalidate cache for nodes in this file |
| 642 | for (const [id, node] of this.nodeCache) { |
| 643 | if (node.filePath === filePath) { |
| 644 | this.nodeCache.delete(id); |
| 645 | } |
| 646 | } |
| 647 | this.stmts.deleteNodesByFile.run(filePath); |
| 648 | } |
| 649 | |
| 650 | // =========================================================================== |
| 651 | // Name-segment vocabulary (prompt-hook graph-derived gate) |
no test coverage detected