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

Method fileHasExportedNode

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

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

Callers

nothing calls this directly

Calls 2

prepareMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected