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

Method insertNameSegmentsBatch

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

722
723 /** Insert segments for a batch of names in one transaction (vocab heal path). */
724 insertNameSegmentsBatch(names: string[]): void {
725 this.db.transaction(() => {
726 const rows: unknown[][] = [];
727 for (const name of names) this.collectNameSegmentRows(name, rows);
728 this.runBatched(
729 'insertNameSegments',
730 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ',
731 '(?,?)',
732 rows
733 );
734 })();
735 }
736
737 /**
738 * 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