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

Method getNodesByFileAndName

src/db/queries.ts:1320–1328  ·  view source on GitHub ↗

The nodes of a file with one name, in getNodesByFile order, decoding only those rows.

(filePath: string, name: string)

Source from the content-addressed store, hash-verified

1318
1319 /** The nodes of a file with one name, in {@link getNodesByFile} order, decoding only those rows. */
1320 getNodesByFileAndName(filePath: string, name: string): Node[] {
1321 if (!this.stmts.getNodesByFileAndName) {
1322 this.stmts.getNodesByFileAndName = prepareNodeStatement(
1323 this.db,
1324 'SELECT * FROM nodes WHERE file_path = ? AND name = ? ORDER BY start_line, id'
1325 );
1326 }
1327 return this.stmts.getNodesByFileAndName.all(filePath, name);
1328 }
1329
1330 /**
1331 * Get all nodes in a file

Callers 1

createContextMethod · 0.80

Calls 2

prepareNodeStatementFunction · 0.85
allMethod · 0.65

Tested by

no test coverage detected