Recreate the FTS triggers + rebuild if a bulk-load window never closed.
()
| 354 | |
| 355 | /** Recreate the FTS triggers + rebuild if a bulk-load window never closed. */ |
| 356 | private healBulkNodeLoad(): void { |
| 357 | const row = this.db |
| 358 | .prepare( |
| 359 | `SELECT count(*) AS c FROM sqlite_master WHERE type = 'trigger' AND name IN ('nodes_ai','nodes_ad','nodes_au')` |
| 360 | ) |
| 361 | .get() as { c: number } | undefined; |
| 362 | if ((row?.c ?? 0) >= DatabaseConnection.FTS_TRIGGER_NAMES.length) return; |
| 363 | this.endBulkNodeLoad(); |
| 364 | } |
| 365 | |
| 366 | /** |
| 367 | * Recreate the FTS sync triggers from schema.sql — extracted from the file |
no test coverage detected