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

Method getFailedPythonAttrRefKeys

src/db/queries.ts:6078–6090  ·  view source on GitHub ↗

* The failed python attribute-chain refs — one attribute hop * (`self.client.send`) or a call receiver (`make().send`) — in `filePaths`, * as just the columns a sync needs to choose among them.

(filePaths: string[])

Source from the content-addressed store, hash-verified

6076 * as just the columns a sync needs to choose among them.
6077 */
6078 getFailedPythonAttrRefKeys(filePaths: string[]): Array<{ id: number; fromNodeId: string; referenceName: string; filePath: string }> {
6079 // One scan, filtered here: a closure is often most of the project, and a
6080 // `file_path IN (...)` per chunk re-runs the GLOB filters over every row.
6081 const wanted = new Set(filePaths);
6082 const rows = this.db
6083 .prepare(`SELECT id, from_node_id, reference_name, file_path FROM unresolved_refs WHERE ${FAILED_PY_ATTR_REF}`)
6084 .all() as Array<{ id: number; from_node_id: string; reference_name: string; file_path: string }>;
6085 const out: Array<{ id: number; fromNodeId: string; referenceName: string; filePath: string }> = [];
6086 for (const r of rows) {
6087 if (wanted.has(r.file_path)) out.push({ id: r.id, fromNodeId: r.from_node_id, referenceName: r.reference_name, filePath: r.file_path });
6088 }
6089 return out;
6090 }
6091
6092 /** Unresolved refs by row id. */
6093 getUnresolvedReferencesByIds(ids: number[]): UnresolvedReference[] {

Callers 1

Calls 4

hasMethod · 0.80
pushMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected