* Enter bulk-load mode: drop the per-row FTS sync triggers so mass node * inserts skip per-row tokenization. MUST be paired with endBulkNodeLoad() * (use try/finally); a crash inside the window is healed on the next open(). * The window is DB-wide (triggers are schema objects), which is saf
()
| 135 | * row written by anyone during the window is captured by the rebuild. |
| 136 | */ |
| 137 | beginBulkNodeLoad(): void { |
| 138 | for (const t of DatabaseConnection.FTS_TRIGGER_NAMES) { |
| 139 | this.db.exec(`DROP TRIGGER IF EXISTS ${t}`); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * Leave bulk-load mode: rebuild the whole FTS index from the nodes table in |