PHP Класс Cake\Database\Expression\TupleComparison

Наследование: extends Cake\Database\Expression\Comparison
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string | array $fields, array | Cake\Database\ExpressionInterface $values, array $types = [], string $conjunction = '=' ) Constructor
isMulti ( ) : boolean Determines if each of the values in this expressions is a tuple in itself
sql ( ValueBinder $generator ) : string Convert the expression into a SQL fragment.
traverse ( callable $callable ) : void Traverses the tree of expressions stored in this object, visiting first expressions in the left hand side and then the rest.

Защищенные методы

Метод Описание
_bindValue ( ValueBinder $generator, mixed $value, string $type ) : string Registers a value in the placeholder generator and returns the generated placeholder
_stringifyValues ( ValueBinder $generator ) : string Returns a string with the values as placeholders in a string to be used for the SQL version of this expression
_traverseValue ( mixed $value, callable $callable ) : void Conditionally executes the callback for the passed value if it is an ExpressionInterface

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string | array $fields, array | Cake\Database\ExpressionInterface $values, array $types = [], string $conjunction = '=' )
$fields string | array the fields to use to form a tuple
$values array | Cake\Database\ExpressionInterface the values to use to form a tuple
$types array the types names to use for casting each of the values, only one type per position in the value array in needed
$conjunction string the operator used for comparing field and value

_bindValue() защищенный Метод

Registers a value in the placeholder generator and returns the generated placeholder
protected _bindValue ( ValueBinder $generator, mixed $value, string $type ) : string
$generator Cake\Database\ValueBinder The value binder
$value mixed The value to bind
$type string The type to use
Результат string generated placeholder

_stringifyValues() защищенный Метод

Returns a string with the values as placeholders in a string to be used for the SQL version of this expression
protected _stringifyValues ( ValueBinder $generator ) : string
$generator Cake\Database\ValueBinder The value binder to convert expressions with.
Результат string

_traverseValue() защищенный Метод

Conditionally executes the callback for the passed value if it is an ExpressionInterface
protected _traverseValue ( mixed $value, callable $callable ) : void
$value mixed The value to traverse
$callable callable The callable to use when traversing
Результат void

isMulti() публичный Метод

Determines if each of the values in this expressions is a tuple in itself
public isMulti ( ) : boolean
Результат boolean

sql() публичный Метод

Convert the expression into a SQL fragment.
public sql ( ValueBinder $generator ) : string
$generator Cake\Database\ValueBinder Placeholder generator object
Результат string

traverse() публичный Метод

Callback function receives as its only argument an instance of an ExpressionInterface
public traverse ( callable $callable ) : void
$callable callable The callable to apply to sub-expressions
Результат void