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

Method getNodesByFile

src/db/queries.ts:920–928  ·  view source on GitHub ↗

* Get all nodes in a file

(filePath: string)

Source from the content-addressed store, hash-verified

918 * Get all nodes in a file
919 */
920 getNodesByFile(filePath: string): Node[] {
921 if (!this.stmts.getNodesByFile) {
922 this.stmts.getNodesByFile = this.db.prepare(
923 'SELECT * FROM nodes WHERE file_path = ? ORDER BY start_line'
924 );
925 }
926 const rows = this.stmts.getNodesByFile.all(filePath) as NodeRow[];
927 return rows.map(rowToNode);
928 }
929
930 /**
931 * Find the file that holds the densest concentration of the project's

Callers 3

getNodesInFileMethod · 0.80
createContextMethod · 0.80
getExportedSymbolsMethod · 0.80

Calls 2

prepareMethod · 0.65
allMethod · 0.65

Tested by

no test coverage detected