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

Method getFailedPythonAttrRefKeys

src/db/queries.ts:5639–5651  ·  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

5637 * as just the columns a sync needs to choose among them.
5638 */
5639 getFailedPythonAttrRefKeys(filePaths: string[]): Array<{ id: number; fromNodeId: string; referenceName: string; filePath: string }> {
5640 // One scan, filtered here: a closure is often most of the project, and a
5641 // `file_path IN (...)` per chunk re-runs the GLOB filters over every row.
5642 const wanted = new Set(filePaths);
5643 const rows = this.db
5644 .prepare(`SELECT id, from_node_id, reference_name, file_path FROM unresolved_refs WHERE ${FAILED_PY_ATTR_REF}`)
5645 .all() as Array<{ id: number; from_node_id: string; reference_name: string; file_path: string }>;
5646 const out: Array<{ id: number; fromNodeId: string; referenceName: string; filePath: string }> = [];
5647 for (const r of rows) {
5648 if (wanted.has(r.file_path)) out.push({ id: r.id, fromNodeId: r.from_node_id, referenceName: r.reference_name, filePath: r.file_path });
5649 }
5650 return out;
5651 }
5652
5653 /** Unresolved refs by row id. */
5654 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