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

Method getDistinctNodeNames

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

1086 * (file basenames and import specifiers are excluded from the vocab — see
1087 * insertNode). */
1088 getDistinctNodeNames(limit: number, offset: number): string[] {
1089 const rows = this.db
1090 .prepare("SELECT DISTINCT name FROM nodes WHERE kind NOT IN ('file', 'import') ORDER BY name LIMIT ? OFFSET ?")
1091 .all(limit, offset) as Array<{ name: string }>;
1092 return rows.map((r) => r.name);
1093 }
1094
1095 /** Insert segments for a batch of names in one transaction (vocab heal path). */
1096 insertNameSegmentsBatch(names: string[]): void {

Callers 1

Calls 3

mapMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected