* Delete all nodes for a file
(filePath: string)
| 679 | * Delete all nodes for a file |
| 680 | */ |
| 681 | deleteNodesByFile(filePath: string): void { |
| 682 | if (!this.stmts.deleteNodesByFile) { |
| 683 | this.stmts.deleteNodesByFile = this.db.prepare('DELETE FROM nodes WHERE file_path = ?'); |
| 684 | } |
| 685 | // Invalidate cache for nodes in this file |
| 686 | for (const [id, node] of this.nodeCache) { |
| 687 | if (node.filePath === filePath) { |
| 688 | this.nodeCache.delete(id); |
| 689 | } |
| 690 | } |
| 691 | this.stmts.deleteNodesByFile.run(filePath); |
| 692 | } |
| 693 | |
| 694 | // =========================================================================== |
| 695 | // Name-segment vocabulary (prompt-hook graph-derived gate) |
no test coverage detected