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

Method getTopLevelSignaturesMentioning

src/db/queries.ts:1673–1680  ·  view source on GitHub ↗

* The `signature` of each top-level node of these kinds and languages whose * text holds one of `names`. A sync asks this about the definitions it changed, * so no node is built and nothing is sorted; `names` is the caller's to keep short.

(kinds: readonly NodeKind[], languages: readonly string[], names: readonly string[])

Source from the content-addressed store, hash-verified

1671 * so no node is built and nothing is sorted; `names` is the caller's to keep short.
1672 */
1673 getTopLevelSignaturesMentioning(kinds: readonly NodeKind[], languages: readonly string[], names: readonly string[]): string[] {
1674 const marks = (n: number): string => new Array(n).fill('?').join(', ');
1675 const rows = this.db.prepare(
1676 `SELECT signature FROM nodes WHERE kind IN (${marks(kinds.length)}) AND language IN (${marks(languages.length)})
1677 AND qualified_name = name AND (${names.map(() => 'instr(signature, ?) > 0').join(' OR ')})`
1678 ).all(...kinds, ...languages, ...names) as Array<{ signature: string }>;
1679 return rows.map((row) => row.signature);
1680 }
1681
1682 /**
1683 * Get all nodes in the database

Callers 1

aliasMayNameFunction · 0.80

Calls 4

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

Tested by

no test coverage detected