* 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
()
| 260 | * row written by anyone during the window is captured by the rebuild. |
| 261 | */ |
| 262 | beginBulkNodeLoad(): void { |
| 263 | if (!this.fts5Available) return; |
| 264 | for (const t of DatabaseConnection.FTS_TRIGGER_NAMES) { |
| 265 | this.db.exec(`DROP TRIGGER IF EXISTS ${t}`); |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * Leave bulk-load mode: rebuild the whole FTS index from the nodes table in |