* Every unresolved reference recorded in one FILE, ordered by line. * * The per-symbol form above answers "what does this body reach that the * index does not hold". A whole-file reader asks the same question of every * line at once, and asking it one symbol at a time is a query per symb
(filePath: string, limit = 5000)
| 3889 | * order, so a cap trims the END of the file, which is at least legible. |
| 3890 | */ |
| 3891 | getUnresolvedReferencesInFile(filePath: string, limit = 5000): UnresolvedReference[] { |
| 3892 | if (!this.stmts.getUnresolvedInFile) { |
| 3893 | this.stmts.getUnresolvedInFile = this.db.prepare( |
| 3894 | 'SELECT * FROM unresolved_refs WHERE file_path = ? ORDER BY line, col LIMIT ?' |
| 3895 | ); |
| 3896 | } |
| 3897 | const rows = this.stmts.getUnresolvedInFile.all(filePath, limit) as UnresolvedRefRow[]; |
| 3898 | return rows.map((row) => ({ |
| 3899 | fromNodeId: row.from_node_id, |
| 3900 | referenceName: row.reference_name, |
| 3901 | referenceKind: row.reference_kind as EdgeKind, |
| 3902 | line: row.line, |
| 3903 | column: row.col, |
| 3904 | candidates: row.candidates ? safeJsonParse(row.candidates, undefined) : undefined, |
| 3905 | filePath: row.file_path, |
| 3906 | language: row.language as Language, |
| 3907 | rowId: row.id, |
| 3908 | })); |
| 3909 | } |
| 3910 | |
| 3911 | /** |
| 3912 | * The references named `tail` that the resolver gave up on — `h.ServeHTTP(…)` |
no test coverage detected