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

Method insertNameSegmentsBatch

src/db/queries.ts:1096–1107  ·  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

1094
1095 /** Insert segments for a batch of names in one transaction (vocab heal path). */
1096 insertNameSegmentsBatch(names: string[]): void {
1097 this.db.transaction(() => {
1098 const rows: unknown[][] = [];
1099 for (const name of names) this.collectNameSegmentRows(name, rows);
1100 this.runBatched(
1101 'insertNameSegments',
1102 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ',
1103 '(?,?)',
1104 rows
1105 );
1106 })();
1107 }
1108
1109 /**
1110 * 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