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

Method getDistinctNodeNames

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

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

Callers 1

Calls 3

mapMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected