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

Method getExportedNodesByFile

src/db/queries.ts:1308–1315  ·  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

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