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

Method fileHasExportedNode

src/db/queries.ts:1300–1307  ·  view source on GitHub ↗

* Whether any node in `filePath` is exported — `getNodesByFile(f).some((n) => * n.isExported)` as one indexed probe, without decoding the file's nodes.

(filePath: string)

Source from the content-addressed store, hash-verified

1298 * n.isExported)` as one indexed probe, without decoding the file's nodes.
1299 */
1300 fileHasExportedNode(filePath: string): boolean {
1301 if (!this.stmts.fileHasExportedNode) {
1302 this.stmts.fileHasExportedNode = this.db.prepare(
1303 'SELECT 1 FROM nodes WHERE file_path = ? AND is_exported = 1 LIMIT 1'
1304 );
1305 }
1306 return this.stmts.fileHasExportedNode.get(filePath) !== undefined;
1307 }
1308
1309 /** The exported nodes of a file, in {@link getNodesByFile} order, decoding only those rows. */
1310 getExportedNodesByFile(filePath: string): Node[] {

Callers

nothing calls this directly

Calls 2

prepareMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected