MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getUnresolvedReferencesInFile

Method getUnresolvedReferencesInFile

src/db/queries.ts:3563–3581  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

3561 * order, so a cap trims the END of the file, which is at least legible.
3562 */
3563 getUnresolvedReferencesInFile(filePath: string, limit = 5000): UnresolvedReference[] {
3564 if (!this.stmts.getUnresolvedInFile) {
3565 this.stmts.getUnresolvedInFile = this.db.prepare(
3566 'SELECT * FROM unresolved_refs WHERE file_path = ? ORDER BY line, col LIMIT ?'
3567 );
3568 }
3569 const rows = this.stmts.getUnresolvedInFile.all(filePath, limit) as UnresolvedRefRow[];
3570 return rows.map((row) => ({
3571 fromNodeId: row.from_node_id,
3572 referenceName: row.reference_name,
3573 referenceKind: row.reference_kind as EdgeKind,
3574 line: row.line,
3575 column: row.col,
3576 candidates: row.candidates ? safeJsonParse(row.candidates, undefined) : undefined,
3577 filePath: row.file_path,
3578 language: row.language as Language,
3579 rowId: row.id,
3580 }));
3581 }
3582
3583 /**
3584 * The references named `tail` that the resolver gave up on — `h.ServeHTTP(…)`

Callers 1

buildOutsideRefsFunction · 0.45

Calls 4

safeJsonParseFunction · 0.90
mapMethod · 0.80
prepareMethod · 0.65
allMethod · 0.65

Tested by

no test coverage detected