Свойство | Тип | Описание | |
---|---|---|---|
$_bindings | array | Array containing a list of bound values to the conditions on this object. Each array entry is another array structure containing the actual bound value, its type and the placeholder it is bound to. | |
$_bindingsCount | integer | A counter of the number of parameters bound in this expression object |
Метод | Описание | |
---|---|---|
attachTo ( Cake\Database\StatementInterface $statement ) : void | Binds all the stored values in this object to the passed statement. | |
bind ( string | integer $param, mixed $value, string | integer $type = 'string' ) : void | Associates a query placeholder to a value and a type | |
bindings ( ) : array | Returns all values bound to this expression object at this nesting level. | |
generateManyNamed ( array | Traversable $values, string $type = 'string' ) : array | Creates unique named placeholders for each of the passed values and binds them with the specified type. | |
placeholder ( string $token ) : string | Creates a unique placeholder name if the token provided does not start with ":" otherwise, it will return the same string and internally increment the number of placeholders generated by this object. | |
reset ( ) : void | Clears any bindings that were previously registered | |
resetCount ( ) : void | Resets the bindings count without clearing previously bound values |
public bind ( string | integer $param, mixed $value, string | integer $type = 'string' ) : void | ||
$param | string | integer | placeholder to be replaced with quoted version of $value |
$value | mixed | The value to be bound |
$type | string | integer | the mapped type name, used for casting when sending to database |
Результат | void |
public generateManyNamed ( array | Traversable $values, string $type = 'string' ) : array | ||
$values | array | Traversable | The list of values to be bound |
$type | string | The type with which all values will be bound |
Результат | array | with the placeholders to insert in the query |
public placeholder ( string $token ) : string | ||
$token | string | string from which the placeholder will be derived from, if it starts with a colon, then the same string is returned |
Результат | string | to be used as a placeholder in a query expression |
public resetCount ( ) : void | ||
Результат | void |
protected array $_bindings | ||
Результат | array |
protected int $_bindingsCount | ||
Результат | integer |