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

Method getNodeNamesOfKinds

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

4680
4681 /** The names of a language's nodes of the given kinds (repeats included), decoding nothing else. */
4682 getNodeNamesOfKinds(language: Language, kinds: readonly NodeKind[]): string[] {
4683 // `+language`: the kind index narrows further than the language one.
4684 const rows = this.db
4685 .prepare(`SELECT name FROM nodes WHERE kind IN (${kinds.map(() => '?').join(', ')}) AND +language = ?`)
4686 .all(...kinds, language) as Array<{ name: string }>;
4687 return rows.map((r) => r.name);
4688 }
4689
4690 /**
4691 * 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