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

Method insertNameSegmentsBatch

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

678
679 /** Insert segments for a batch of names in one transaction (vocab heal path). */
680 insertNameSegmentsBatch(names: string[]): void {
681 this.db.transaction(() => {
682 const rows: unknown[][] = [];
683 for (const name of names) this.collectNameSegmentRows(name, rows);
684 this.runBatched(
685 'insertNameSegments',
686 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ',
687 '(?,?)',
688 rows
689 );
690 })();
691 }
692
693 /**
694 * 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