* 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)
| 3527 | * order, so a cap trims the END of the file, which is at least legible. |
| 3528 | */ |
| 3529 | getUnresolvedReferencesInFile(filePath: string, limit = 5000): UnresolvedReference[] { |
| 3530 | if (!this.stmts.getUnresolvedInFile) { |
| 3531 | this.stmts.getUnresolvedInFile = this.db.prepare( |
| 3532 | 'SELECT * FROM unresolved_refs WHERE file_path = ? ORDER BY line, col LIMIT ?' |
| 3533 | ); |
| 3534 | } |
| 3535 | const rows = this.stmts.getUnresolvedInFile.all(filePath, limit) as UnresolvedRefRow[]; |
| 3536 | return rows.map((row) => ({ |
| 3537 | fromNodeId: row.from_node_id, |
| 3538 | referenceName: row.reference_name, |
| 3539 | referenceKind: row.reference_kind as EdgeKind, |
| 3540 | line: row.line, |
| 3541 | column: row.col, |
| 3542 | candidates: row.candidates ? safeJsonParse(row.candidates, undefined) : undefined, |
| 3543 | filePath: row.file_path, |
| 3544 | language: row.language as Language, |
| 3545 | rowId: row.id, |
| 3546 | })); |
| 3547 | } |
| 3548 | |
| 3549 | /** |
| 3550 | * References recorded against a symbol that never resolved to a node — the |
no test coverage detected