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

Method getExportedNodesByFile

src/db/queries.ts:1310–1317  ·  view source on GitHub ↗

The exported nodes of a file, in getNodesByFile order, decoding only those rows.

(filePath: string)

Source from the content-addressed store, hash-verified

1308
1309 /** The exported nodes of a file, in {@link getNodesByFile} order, decoding only those rows. */
1310 getExportedNodesByFile(filePath: string): Node[] {
1311 if (!this.stmts.getExportedNodesByFile) {
1312 this.stmts.getExportedNodesByFile = this.db.prepare(
1313 'SELECT * FROM nodes WHERE file_path = ? AND is_exported = 1 ORDER BY start_line, id'
1314 );
1315 }
1316 return (this.stmts.getExportedNodesByFile.all(filePath) as NodeRow[]).map(rowToNode);
1317 }
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[] {

Callers 1

createContextMethod · 0.80

Calls 3

mapMethod · 0.80
prepareMethod · 0.65
allMethod · 0.65

Tested by

no test coverage detected