Class Predicate
Defers a predicate until its field and binding type are supplied by a condition array.
Method Summary
-
__construct() public
Creates a reusable description of a supported predicate operation.
-
resolve() public
Builds an independent expression using the surrounding field and type.
Method Detail
__construct() ¶ public
__construct(Cake\Database\Enum\PredicateOperation $operation, array<mixed> $values = [], string|null $type = null)
Creates a reusable description of a supported predicate operation.
Parameters
-
Cake\Database\Enum\PredicateOperation$operation The predicate operation, rather than raw SQL.
-
array<mixed>$values optional The operands supplied to the operation.
-
string|null$type optional An explicit binding type, overriding inferred types.
resolve() ¶ public
resolve(string $field, string|null $type = null): Cake\Database\ExpressionInterface
Builds an independent expression using the surrounding field and type.
Parameters
-
string$field The field or trusted SQL expression to compare.
-
string|null$type optional The type inferred from the surrounding condition array.
Returns
Cake\Database\ExpressionInterface