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

Method insertNameSegmentsBatch

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

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