* 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)
| 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: |
no test coverage detected