resolveEdgeVertexScope.php
Table of Contents
Functions
- resolveEdgeVertexScope() : array{0: string|null, 1: string|null}
- Compiles the **row scope** an edge definition declares over the vertices it traverses — the `[ $filter , $prune ]` pair, both already AQL predicate strings targeting `$vertexRef`, or `null` when nothing is declared.
Functions
resolveEdgeVertexScope()
Compiles the **row scope** an edge definition declares over the vertices it traverses — the `[ $filter , $prune ]` pair, both already AQL predicate strings targeting `$vertexRef`, or `null` when nothing is declared.
resolveEdgeVertexScope(array<string|int, mixed> $definition, string $vertexRef) : array{0: string|null, 1: string|null}
Two keys, answering two different questions:
AQL::WHERE— WHICH vertices the relation yields. Compiled from theField::WHENgrammar, so a value may hold anaqlBindRef()and the retained set is decided at query time (a bind bound to[]retains nothing, an absent bind fails the query — never "no filter"). Emitted as aFILTERafter the traversal.AQL::PRUNE— whether the walk STOPS there. AFILTERonly filters the traversal's output: on a ranged relation the walk still descends through a masked vertex, so its descendants keep being projected.truereuses theAQL::WHEREpredicate negated ("hide it and its descent"); a condition of its own covers the case where stopping is not hiding. A condition is compiled rather than read as a boolean — anything written there is truthy, so it would otherwise be silently swapped for the negatedAQL::WHERE.falsemeans OFF, like an absent key, so aAQL::PRUNE => $flagtoggle works both ways.
The two are emitted together and neither replaces the other: PRUNE stops the
walk after visiting, so the vertex it stops on is still returned unless the
FILTER removes it.
This lives in its own helper because the list and the count must read the declaration the same way — a count that scoped differently from the list would announce a number the rows contradict, which is the whole class of bug these keys exist to close.
Parameters
- $definition : array<string|int, mixed>
-
The edge definition (reads
AQL::WHERE/AQL::PRUNE). - $vertexRef : string
-
The AQL variable of the traversed vertex both predicates target.
Tags
Return values
array{0: string|null, 1: string|null} —The [ $filter , $prune ] predicates.