* 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.
()
| 4693 | * decoding every import node of a large C++ project costs several times more. |
| 4694 | */ |
| 4695 | getCppIncludeNodes(): Array<Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>> { |
| 4696 | if (!this.stmts.getCppIncludeNodes) { |
| 4697 | this.stmts.getCppIncludeNodes = this.db.prepare( |
| 4698 | `SELECT id, name, file_path AS filePath, language, start_line AS startLine, start_column AS startColumn |
| 4699 | FROM nodes WHERE kind = 'import' AND language IN ('c', 'cpp')` |
| 4700 | ); |
| 4701 | } |
| 4702 | return this.stmts.getCppIncludeNodes.all() as Array<Pick<Node, 'id' | 'name' | 'filePath' | 'language' | 'startLine' | 'startColumn'>>; |
| 4703 | } |
| 4704 | |
| 4705 | /** |
| 4706 | * Stream the distinct node names one row at a time — the incremental |