* Delete a node by ID
(id: string)
| 385 | * Delete a node by ID |
| 386 | */ |
| 387 | deleteNode(id: string): void { |
| 388 | if (!this.stmts.deleteNode) { |
| 389 | this.stmts.deleteNode = this.db.prepare('DELETE FROM nodes WHERE id = ?'); |
| 390 | } |
| 391 | // Invalidate cache |
| 392 | this.nodeCache.delete(id); |
| 393 | this.stmts.deleteNode.run(id); |
| 394 | } |
| 395 | |
| 396 | /** |
| 397 | * Delete all nodes for a file |