buildCombinedInlineFilter.php
Table of Contents
Functions
- buildCombinedInlineFilter() : string
- Build combined inline filter conditions for array expansion.
Functions
buildCombinedInlineFilter()
Build combined inline filter conditions for array expansion.
buildCombinedInlineFilter(array<string|int, mixed> $match, array<string|int, mixed>|null &$binds[, array<string|int, mixed> $allowedFields = [] ][, mixed $alt = null ]) : string
Supports multiple logic operators:
- "all": ALL conditions must be true (AND logic)
- "any": AT LEAST ONE condition must be true (OR logic)
- "none": NO condition must be true (NOT logic)
Supports two formats:
-
Simple object (all conditions are "eq" with AND logic): {"propertyID": "X", "value": true} → CURRENT.propertyID == "X" AND CURRENT.value == true
-
Explicit array with operators and logic: {"all": [ {"key": "propertyID", "op": "eq", "val": "X"}, {"key": "value", "op": "ne", "val": null} ]} → CURRENT.propertyID == "X" AND CURRENT.value != null
{"any": [ {"key": "email", "op": "ne", "val": null}, {"key": "telephone", "op": "ne", "val": null} ]} → CURRENT.email != null OR CURRENT.telephone != null
{"none": [ {"key": "status", "op": "eq", "val": "deleted"}, {"key": "archived", "op": "eq", "val": true} ]} → !(CURRENT.status == "deleted" OR CURRENT.archived == true)
Parameters
- $match : array<string|int, mixed>
-
Match configuration
- $binds : array<string|int, mixed>|null
-
Bind variables array
- $allowedFields : array<string|int, mixed> = []
-
Optional: List of allowed field names for validation
- $alt : mixed = null
-
Optional
alttransformation applied to EVERY sub-field condition (field + value).
Tags
Return values
string —The combined inline filter condition