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

Method insertNameSegmentsBatch

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

787
788 /** Insert segments for a batch of names in one transaction (vocab heal path). */
789 insertNameSegmentsBatch(names: string[]): void {
790 this.db.transaction(() => {
791 const rows: unknown[][] = [];
792 for (const name of names) this.collectNameSegmentRows(name, rows);
793 this.runBatched(
794 'insertNameSegments',
795 'INSERT OR IGNORE INTO name_segment_vocab (segment, name) VALUES ',
796 '(?,?)',
797 rows
798 );
799 })();
800 }
801
802 /**
803 * 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