MCPcopy
hub / github.com/colbymchenry/codegraph / getNodesByFile

Method getNodesByFile

src/db/queries.ts:533–541  ·  view source on GitHub ↗

* Get all nodes in a file

(filePath: string)

Source from the content-addressed store, hash-verified

531 * Get all nodes in a file
532 */
533 getNodesByFile(filePath: string): Node[] {
534 if (!this.stmts.getNodesByFile) {
535 this.stmts.getNodesByFile = this.db.prepare(
536 'SELECT * FROM nodes WHERE file_path = ? ORDER BY start_line'
537 );
538 }
539 const rows = this.stmts.getNodesByFile.all(filePath) as NodeRow[];
540 return rows.map(rowToNode);
541 }
542
543 /**
544 * 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