MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / healBulkNodeLoad

Method healBulkNodeLoad

src/db/index.ts:323–331  ·  view source on GitHub ↗

Recreate the FTS triggers + rebuild if a bulk-load window never closed.

()

Source from the content-addressed store, hash-verified

321
322 /** Recreate the FTS triggers + rebuild if a bulk-load window never closed. */
323 private healBulkNodeLoad(): void {
324 const row = this.db
325 .prepare(
326 `SELECT count(*) AS c FROM sqlite_master WHERE type = 'trigger' AND name IN ('nodes_ai','nodes_ad','nodes_au')`
327 )
328 .get() as { c: number } | undefined;
329 if ((row?.c ?? 0) >= DatabaseConnection.FTS_TRIGGER_NAMES.length) return;
330 this.endBulkNodeLoad();
331 }
332
333 /**
334 * Recreate the FTS sync triggers from schema.sql — extracted from the file

Callers 1

openMethod · 0.95

Calls 3

endBulkNodeLoadMethod · 0.95
getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected