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

Method getIncomingEdgesExceptContains

src/db/queries.ts:2795–2803  ·  view source on GitHub ↗

* Incoming edges to a node except `contains`: the edges that make their * source depend on the target, in getIncomingEdges order. * * Impact traversal runs this once per visited node, so it stays one index * search with no LIMIT. A kind list searches the index once per kind, and

(targetId: string)

Source from the content-addressed store, hash-verified

2793 * LIMIT under this ORDER BY made each read markedly slower (#3248).
2794 */
2795 getIncomingEdgesExceptContains(targetId: string): Edge[] {
2796 if (!this.stmts.getDependentEdgesByTarget) {
2797 this.stmts.getDependentEdgesByTarget = this.db.prepare(
2798 "SELECT * FROM edges WHERE target = ? AND kind != 'contains' ORDER BY kind, source, line, col"
2799 );
2800 }
2801 const rows = this.stmts.getDependentEdgesByTarget.all(targetId) as EdgeRow[];
2802 return rows.map(rowToEdge);
2803 }
2804
2805 /**
2806 * Get incoming edges to a node. Kind must precede opaque source IDs:

Callers 2

getImpactRecursiveMethod · 0.80
graph.test.tsFile · 0.80

Calls 3

mapMethod · 0.80
prepareMethod · 0.65
allMethod · 0.65

Tested by

no test coverage detected