* The import node of every C / C++ `#include`, narrowed to the path it * spells and where it is written: the include graph reads nothing else, and * decoding every import node of a large C++ project costs several times more.
()
| 4804 | * decoding every import node of a large C++ project costs several times more. |
| 4805 | */ |
| 4806 | getCppIncludeNodes(): Array<Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>> { |
| 4807 | if (!this.stmts.getCppIncludeNodes) { |
| 4808 | this.stmts.getCppIncludeNodes = this.db.prepare( |
| 4809 | `SELECT id, name, file_path AS filePath, language, start_line AS startLine, start_column AS startColumn |
| 4810 | FROM nodes WHERE kind = 'import' AND language IN ('c', 'cpp')` |
| 4811 | ); |
| 4812 | } |
| 4813 | return this.stmts.getCppIncludeNodes.all() as Array<Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>>; |
| 4814 | } |
| 4815 | |
| 4816 | /** |
| 4817 | * Stream the distinct node names one row at a time — the incremental |