Recreate the FTS triggers + rebuild if a bulk-load window never closed.
()
| 466 | |
| 467 | /** Recreate the FTS triggers + rebuild if a bulk-load window never closed. */ |
| 468 | private healBulkNodeLoad(): void { |
| 469 | if (!this.fts5Available) return; |
| 470 | const row = this.db |
| 471 | .prepare( |
| 472 | `SELECT count(*) AS c FROM sqlite_master WHERE type = 'trigger' AND name IN ('nodes_ai','nodes_ad','nodes_au')` |
| 473 | ) |
| 474 | .get() as { c: number } | undefined; |
| 475 | if ((row?.c ?? 0) >= DatabaseConnection.FTS_TRIGGER_NAMES.length) return; |
| 476 | this.endBulkNodeLoad(); |
| 477 | } |
| 478 | |
| 479 | /** Recreate every secondary index a killed bulk parse/ref/edge window may leave dropped. */ |
| 480 | private healBulkSecondaryIndexes(): void { |
no test coverage detected