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

Method insertNameSegmentsBatch

src/db/queries.ts:1162–1173  ·  view source on GitHub ↗

Insert segments for a batch of names in one transaction (vocab heal path).

(names: string[])

Source from the content-addressed store, hash-verified

1160
1161 /** Insert segments for a batch of names in one transaction (vocab heal path). */
1162 insertNameSegmentsBatch(names: string[]): void {
1163 this.db.transaction(() => {
1164 const rows: unknown[][] = [];
1165 for (const name of names) this.collectNameSegmentRows(name, rows);
1166 this.runBatched(
1167 'insertNameSegments',
1168 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ',
1169 '(?,?)',
1170 rows
1171 );
1172 })();
1173 }
1174
1175 /**
1176 * Names whose segments cover at least `minWords` distinct PROMPT WORDS —

Callers 2

Calls 3

runBatchedMethod · 0.95
transactionMethod · 0.65

Tested by

no test coverage detected