HasFilterString
This trait defines the date filter helpers.
Configure
Defines the 'filters' property in the model (Documents) definition.
Models::PLACES => fn( ContainerInterface $container ) => new Documents
(
$container ,
Collections::PLACES ,
[
...
AQL::FILTERS =>
[
Prop::NAME => FilterType::STRING ,
...
]
...
Tags
Table of Contents
Methods
- prepareFilterEndsWith() : string
- Builds an `ew` (ends with) string filter.
- prepareFilterString() : string
- Prepares the filter clause with a string attribute.
Methods
prepareFilterEndsWith()
Builds an `ew` (ends with) string filter.
protected
prepareFilterEndsWith([array<string|int, mixed> $init = [] ][, array<string|int, mixed>|null &$binds = null ][, string $doc = AQL::DOC ]) : string
AQL has no ENDS_WITH function, so the suffix is matched literally with
RIGHT(key, CHAR_LENGTH(value)) == value — no LIKE pattern, nothing to
escape, symmetric to the literal sw / STARTS_WITH form. The value is
bound once and reused; alt stays available on both sides (e.g. the
{key:lower, val:true} mirror yields RIGHT(LOWER(doc.x), …) == LOWER(@v),
a case-insensitive ends-with).
RIGHT(doc.name, CHAR_LENGTH(@value)) == @value
Parameters
- $init : array<string|int, mixed> = []
-
The filter init (
op=ew). - $binds : array<string|int, mixed>|null = null
-
The bind variables, populated by reference.
- $doc : string = AQL::DOC
-
The document reference.
Tags
Return values
stringprepareFilterString()
Prepares the filter clause with a string attribute.
protected
prepareFilterString([array<string|int, mixed> $init = [] ][, array<string|int, mixed>|null &$binds = null ][, string $doc = AQL::DOC ]) : string
Parameters
- $init : array<string|int, mixed> = []
- $binds : array<string|int, mixed>|null = null
- $doc : string = AQL::DOC