MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / getIncomingEdges

Method getIncomingEdges

src/db/queries.ts:1342–1354  ·  view source on GitHub ↗

* Get incoming edges to a node

(targetId: string, kinds?: EdgeKind[])

Source from the content-addressed store, hash-verified

1340 * Get incoming edges to a node
1341 */
1342 getIncomingEdges(targetId: string, kinds?: EdgeKind[]): Edge[] {
1343 if (kinds && kinds.length > 0) {
1344 const sql = `SELECT * FROM edges WHERE target = ? AND kind IN (${kinds.map(() => '?').join(',')})`;
1345 const rows = this.db.prepare(sql).all(targetId, ...kinds) as EdgeRow[];
1346 return rows.map(rowToEdge);
1347 }
1348
1349 if (!this.stmts.getEdgesByTarget) {
1350 this.stmts.getEdgesByTarget = this.db.prepare('SELECT * FROM edges WHERE target = ?');
1351 }
1352 const rows = this.stmts.getEdgesByTarget.all(targetId) as EdgeRow[];
1353 return rows.map(rowToEdge);
1354 }
1355
1356 /**
1357 * Find all edges where both source and target are in the given node set.

Callers 15

fieldChannelEdgesFunction · 0.45
rnCrossPlatformEdgesFunction · 0.45
containerOfMethod · 0.45
isPolymorphicSiblingMethod · 0.45
getAdjacentEdgesMethod · 0.45
getCallersRecursiveMethod · 0.45
getTypeDescendantsMethod · 0.45
findUsagesMethod · 0.45
getImpactRecursiveMethod · 0.45

Calls 3

joinMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected