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

Method getNodesByFile

src/db/queries.ts:1333–1341  ·  view source on GitHub ↗

* Get all nodes in a file

(filePath: string)

Source from the content-addressed store, hash-verified

1331 * Get all nodes in a file
1332 */
1333 getNodesByFile(filePath: string): Node[] {
1334 if (!this.stmts.getNodesByFile) {
1335 this.stmts.getNodesByFile = prepareNodeStatement(
1336 this.db,
1337 'SELECT * FROM nodes WHERE file_path = ? ORDER BY start_line, id'
1338 );
1339 }
1340 return this.stmts.getNodesByFile.all(filePath);
1341 }
1342
1343 /**
1344 * The {@link NodeIdentity} of every node in a file, without decoding whole

Callers 5

getNodesInFileMethod · 0.80
createContextMethod · 0.80
getExportedSymbolsMethod · 0.80
node-rows.test.tsFile · 0.80

Calls 2

prepareNodeStatementFunction · 0.85
allMethod · 0.65

Tested by

no test coverage detected