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

Method getNodeNamesOfKinds

src/db/queries.ts:4793–4799  ·  view source on GitHub ↗

The names of a language's nodes of the given kinds (repeats included), decoding nothing else.

(language: Language, kinds: readonly NodeKind[])

Source from the content-addressed store, hash-verified

4791
4792 /** The names of a language's nodes of the given kinds (repeats included), decoding nothing else. */
4793 getNodeNamesOfKinds(language: Language, kinds: readonly NodeKind[]): string[] {
4794 // `+language`: the kind index narrows further than the language one.
4795 const rows = this.db
4796 .prepare(`SELECT name FROM nodes WHERE kind IN (${kinds.map(() => '?').join(', ')}) AND +language = ?`)
4797 .all(...kinds, language) as Array<{ name: string }>;
4798 return rows.map((r) => r.name);
4799 }
4800
4801 /**
4802 * The import node of every C / C++ `#include`, narrowed to the path it

Callers

nothing calls this directly

Calls 4

mapMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected