PHP Класс yii\elasticsearch\QueryBuilder

С версии: 2.0
Автор: Carsten Brandt ([email protected])
Наследование: extends yii\base\Object
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$db the database connection.

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

Метод Описание
__construct ( Connection $connection, array $config = [] ) Constructor.
build ( Query $query ) : array Generates query from a Query object.
buildCondition ( string | array $condition ) : string Parses the condition specification and generates the corresponding SQL expression.
buildOrderBy ( $columns ) adds order by condition to the query

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

Метод Описание
buildCompositeInCondition ( $operator, $columns, $values )

Приватные методы

Метод Описание
buildAndCondition ( $operator, $operands )
buildBetweenCondition ( $operator, $operands )
buildHalfBoundedRangeCondition ( string $operator, array $operands ) : array Builds a half-bounded range condition (for "gt", ">", "gte", ">=", "lt", "<", "lte", "<=" operators)
buildHashCondition ( $condition )
buildInCondition ( $operator, $operands )
buildLikeCondition ( $operator, $operands )
buildNotCondition ( $operator, $operands )

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

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

Constructor.
public __construct ( Connection $connection, array $config = [] )
$connection Connection the database connection.
$config array name-value pairs that will be used to initialize the object properties

build() публичный метод

Generates query from a Query object.
public build ( Query $query ) : array
$query Query the [[Query]] object from which the query will be generated
Результат array the generated SQL statement (the first array element) and the corresponding parameters to be bound to the SQL statement (the second array element).

buildCompositeInCondition() защищенный метод

protected buildCompositeInCondition ( $operator, $columns, $values )

buildCondition() публичный метод

Parses the condition specification and generates the corresponding SQL expression.
public buildCondition ( string | array $condition ) : string
$condition string | array the condition specification. Please refer to [[Query::where()]] on how to specify a condition.
Результат string the generated SQL expression

buildOrderBy() публичный метод

adds order by condition to the query
public buildOrderBy ( $columns )

Описание свойств

$db публичное свойство

the database connection.
public $db