$_field
$_field : string|\Cake\Database\ExpressionInterface
The field name or expression to be used in the left hand side of the operator
A Comparison is a type of query expression that represents an operation involving a field an operator and a value. In its most common form the string representation of a comparison is `field = value`
$_field : string|\Cake\Database\ExpressionInterface
The field name or expression to be used in the left hand side of the operator
$_valueExpressions : array<mixed,\Cake\Database\ExpressionInterface>
A cached list of ExpressionInterface objects that were found in the value for this expression.
setField(string|\Cake\Database\ExpressionInterface $field) : void
Sets the field name
string|\Cake\Database\ExpressionInterface | $field | The field to compare with. |
getField() : string|\Cake\Database\ExpressionInterface
Returns the field name
__construct(string|\Cake\Database\ExpressionInterface $field, mixed $value, string $type, string $operator)
Constructor
string|\Cake\Database\ExpressionInterface | $field | the field name to compare to a value |
mixed | $value | The value to be used in comparison |
string | $type | the type name used to cast the value |
string | $operator | the operator used for comparing field and value |
sql(\Cake\Database\ValueBinder $generator) : string
Convert the expression into a SQL fragment.
\Cake\Database\ValueBinder | $generator | Placeholder generator object |
_castToExpression(mixed $value, string $type) : mixed
Conditionally converts the passed value to an ExpressionInterface object if the type class implements the ExpressionTypeInterface. Otherwise, returns the value unmodified.
mixed | $value | The value to converto to ExpressionInterface |
string | $type | The type name |
_stringExpression(\Cake\Database\ValueBinder $generator) : array
Returns a template and a placeholder for the value after registering it with the placeholder $generator
\Cake\Database\ValueBinder | $generator | The value binder to use. |
First position containing the template and the second a placeholder
_bindValue(mixed $value, \Cake\Database\ValueBinder $generator, string $type) : string
Registers a value in the placeholder generator and returns the generated placeholder
mixed | $value | The value to bind |
\Cake\Database\ValueBinder | $generator | The value binder to use |
string | $type | The type of $value |
generated placeholder
_flattenValue(array|\Traversable $value, \Cake\Database\ValueBinder $generator, string|array|null $type = 'string') : string
Converts a traversable value into a set of placeholders generated by $generator and separated by `,`
array|\Traversable | $value | the value to flatten |
\Cake\Database\ValueBinder | $generator | The value binder to use |
string|array|null | $type | the type to cast values to |
Loading…