* 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
()
| 168 | * row written by anyone during the window is captured by the rebuild. |
| 169 | */ |
| 170 | beginBulkNodeLoad(): void { |
| 171 | for (const t of DatabaseConnection.FTS_TRIGGER_NAMES) { |
| 172 | this.db.exec(`DROP TRIGGER IF EXISTS ${t}`); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Leave bulk-load mode: rebuild the whole FTS index from the nodes table in |