resolveTraversalQuantifier.php
Table of Contents
Functions
- resolveTraversalQuantifier() : TraversalQuantifier
- Resolve the `quant` parameter for an edge/join traversal into the predicate decisions that shape its `LENGTH( FOR … RETURN 1 ) <cmp> <threshold>` check.
Functions
resolveTraversalQuantifier()
Resolve the `quant` parameter for an edge/join traversal into the predicate decisions that shape its `LENGTH( FOR … RETURN 1 ) <cmp> <threshold>` check.
resolveTraversalQuantifier(mixed $value) : TraversalQuantifier
This is the relation counterpart of resolveQuantifier() (which targets
the array surface). It shares the same vocabulary — any / all / none / an
integer n — but maps it to a count comparison rather than to an AQL
quantifier keyword:
any(or absent) →LENGTH(...) > 0with aLIMIT 1short-circuit (« at least one linked match ») — the historical, backward-compatible form;none→LENGTH(...) == 0withLIMIT 1(« no linked match »);all→LENGTH(...) == 0withLIMIT 1over the negated leaf (« no linked vertex violates the condition »); vacuously true with no relation. The caller negates the leaf and requires one to be present;- a bare integer
n(or its numeric string) →LENGTH(...) >= n, withoutLIMIT(the rows must be counted). The threshold is cast to an int and inlined, which is injection-safe — and consistent with the array surface.
n means « at least n » and must be >= 1: « at least 0 » is always true
(use none for « no linked match »).
Parameters
- $value : mixed
-
The raw
quantparameter (any,all,none, or an integer).
Tags
Return values
TraversalQuantifier —The resolved predicate decisions.