HasFilterConditions
This trait defines the conditions filter helpers. We can combine filters with logical operators.
Tags
Table of Contents
Methods
- prepareFilterConditions() : string|null
- Prepares the filter clause of a group : a list of conditions, led by its operator (`and` when it has none).
Methods
prepareFilterConditions()
Prepares the filter clause of a group : a list of conditions, led by its operator (`and` when it has none).
public
prepareFilterConditions([array<string|int, mixed> $init = [] ][, array<string|int, mixed>|null &$binds = null ][, string $docRef = AQL::DOC ][, array<string|int, mixed> $auth = [] ]) : string|null
A group that cannot be read is REFUSED : an operator nothing knows (xor), a group
with no condition (["or"]), a not of several conditions — which used to compile
(a ! b), AQL the server refuses. Every member is compiled by
FilterTrait::compileFilter(), which refuses
a member it cannot read instead of dropping it : dropped, it loosened an and.
Parameters
- $init : array<string|int, mixed> = []
-
The group.
- $binds : array<string|int, mixed>|null = null
-
The bind variables, populated by reference.
- $docRef : string = AQL::DOC
-
The document reference the conditions are written against.
- $auth : array<string|int, mixed> = []
-
The request-level authorizer, passed down to every member.
Tags
Return values
string|null —The AQL condition, or null when no member constrains anything.