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

Method getNodesByFile

src/db/queries.ts:876–884  ·  view source on GitHub ↗

* Get all nodes in a file

(filePath: string)

Source from the content-addressed store, hash-verified

874 * Get all nodes in a file
875 */
876 getNodesByFile(filePath: string): Node[] {
877 if (!this.stmts.getNodesByFile) {
878 this.stmts.getNodesByFile = this.db.prepare(
879 'SELECT * FROM nodes WHERE file_path = ? ORDER BY start_line'
880 );
881 }
882 const rows = this.stmts.getNodesByFile.all(filePath) as NodeRow[];
883 return rows.map(rowToNode);
884 }
885
886 /**
887 * 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