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

Method endBulkParseLoad

src/db/index.ts:245–255  ·  view source on GitHub ↗

* Leave bulk-parse-load mode: recreate everything the window dropped, one * table scan per index, with a yield between statements (same * liveness-watchdog rationale as endBulkEdgeLoad — at kernel scale each * build is a long synchronous scan). The edge indexes are rebuilt here too, * so

()

Source from the content-addressed store, hash-verified

243 * beginBulkEdgeLoad simply re-drops them (DROP IF EXISTS — idempotent).
244 */
245 async endBulkParseLoad(): Promise<void> {
246 const schemaPath = path.join(__dirname, 'schema.sql');
247 const schema = fs.readFileSync(schemaPath, 'utf-8');
248 for (const idx of DatabaseConnection.BULK_PARSE_INDEX_NAMES) {
249 const m = schema.match(new RegExp(`CREATE INDEX IF NOT EXISTS ${idx}\\b[^;]*;`));
250 if (!m) throw new Error(`schema.sql: parse index ${idx} not found for bulk-load recreation`);
251 this.db.exec(m[0]);
252 await new Promise((resolve) => setImmediate(resolve));
253 }
254 await this.endBulkEdgeLoad();
255 }
256
257 /**
258 * unresolved_refs secondary indexes NOT read by the batched resolution

Callers 1

indexAllMethod · 0.80

Calls 3

endBulkEdgeLoadMethod · 0.95
execMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected