* 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)
| 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[] { |