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

Method getDistinctNodeNames

src/db/queries.ts:672–677  ·  view source on GitHub ↗

One page of distinct segmentable node names, for batched vocab rebuilds * (file basenames and import specifiers are excluded from the vocab — see * insertNode).

(limit: number, offset: number)

Source from the content-addressed store, hash-verified

670 * (file basenames and import specifiers are excluded from the vocab — see
671 * insertNode). */
672 getDistinctNodeNames(limit: number, offset: number): string[] {
673 const rows = this.db
674 .prepare("SELECT DISTINCT name FROM nodes WHERE kind NOT IN ('file', 'import') ORDER BY name LIMIT ? OFFSET ?")
675 .all(limit, offset) as Array<{ name: string }>;
676 return rows.map((r) => r.name);
677 }
678
679 /** Insert segments for a batch of names in one transaction (vocab heal path). */
680 insertNameSegmentsBatch(names: string[]): void {

Callers 1

Calls 2

allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected