Recreate the FTS triggers + rebuild if a bulk-load window never closed.
()
| 424 | |
| 425 | /** Recreate the FTS triggers + rebuild if a bulk-load window never closed. */ |
| 426 | private healBulkNodeLoad(): void { |
| 427 | if (!this.fts5Available) return; |
| 428 | const row = this.db |
| 429 | .prepare( |
| 430 | `SELECT count(*) AS c FROM sqlite_master WHERE type = 'trigger' AND name IN ('nodes_ai','nodes_ad','nodes_au')` |
| 431 | ) |
| 432 | .get() as { c: number } | undefined; |
| 433 | if ((row?.c ?? 0) >= DatabaseConnection.FTS_TRIGGER_NAMES.length) return; |
| 434 | this.endBulkNodeLoad(); |
| 435 | } |
| 436 | |
| 437 | /** Recreate every secondary index a killed bulk parse/ref/edge window may leave dropped. */ |
| 438 | private healBulkSecondaryIndexes(): void { |
no test coverage detected