HasFacetComplexConditions
Shared builder for the per-field conditions of the "complex" existential facets ({@see HasFacetEdgeComplex}, {@see HasFacetJoinComplex}): both match SEVERAL fields on the same related document, each field accepting a single value, a list (OR) and per-value negation (`-` => `!=`).
Only the iteration source differs between those facets (an edge traversal vs a key-join), so the FILTER conditions are produced once, here.
Tags
Table of Contents
Methods
- prepareComplexConditions() : array<int, string>
- Builds the list of AQL conditions for an object of `field: condition` pairs, each tested on the related document `$docRef`.
Methods
prepareComplexConditions()
Builds the list of AQL conditions for an object of `field: condition` pairs, each tested on the related document `$docRef`.
protected
prepareComplexConditions(mixed $value, string $docRef, string $key, array<string|int, mixed> &$binds[, mixed $alt = null ]) : array<int, string>
Every condition applies to the same related document, so per-value
negation stays inline (!=) and a field given an array OR-es its values
(flipping to AND when a negative term is present, mirroring HasFacetField).
Each sub-field name is validated with assertAttributeName() before
being interpolated, guarding against AQL injection.
A facet-wide alt (from the definition) wraps EVERY sub-field comparison
symmetrically — its key-side chain wraps each related field, its value-side
chain wraps each bound value (e.g. LOWER(v.value) == LOWER(@0)). Per
sub-field alt is not (yet) supported — see static::prepareComplexConditions().
Parameters
- $value : mixed
-
The object of
field: conditionpairs. - $docRef : string
-
The related-document variable (e.g.
doc_numbers). - $key : string
-
The facet key, used to namespace the bind names.
- $binds : array<string|int, mixed>
-
The bind variables, populated by reference.
- $alt : mixed = null
-
The facet-wide
altchain (fromFacet::ALT), applied to every sub-field; null for none.
Tags
Return values
array<int, string> —The AQL conditions (to AND together).