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

Method getNodesByName

src/db/queries.ts:1748–1756  ·  view source on GitHub ↗

* Get nodes by exact name match (uses idx_nodes_name index). * * This is resolution's candidate list, and the ORDER BY is load-bearing for * index correctness, not cosmetic (CG-33). When a reference names a symbol * that several files define and nothing disambiguates them, resolution bin

(name: string)

Source from the content-addressed store, hash-verified

1746 * is capped by AMBIGUOUS_NAME_CEILING (#999).
1747 */
1748 getNodesByName(name: string): Node[] {
1749 if (!this.stmts.getNodesByName) {
1750 this.stmts.getNodesByName = prepareNodeStatement(
1751 this.db,
1752 'SELECT * FROM nodes WHERE name = ? ORDER BY file_path, start_line, id'
1753 );
1754 }
1755 return this.stmts.getNodesByName.all(name);
1756 }
1757
1758 /**
1759 * Nodes whose name starts with `prefix`, by index range scan (a LIKE would

Callers

nothing calls this directly

Calls 2

prepareNodeStatementFunction · 0.85
allMethod · 0.65

Tested by

no test coverage detected