PHP Class yii\elasticsearch\QueryBuilder

Since: 2.0
Author: Carsten Brandt ([email protected])
Inheritance: extends yii\base\Object
Afficher le fichier Open project: yiisoft/yii2-elasticsearch Class Usage Examples

Méthodes publiques

Свойство Type Description
$db the database connection.

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
buildCompositeInCondition ( $operator, $columns, $values )

Private Methods

Méthode Description
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 )

Method Details

__construct() public méthode

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() public méthode

Generates query from a Query object.
public build ( Query $query ) : array
$query Query the [[Query]] object from which the query will be generated
Résultat 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 méthode

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

buildCondition() public méthode

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.
Résultat string the generated SQL expression

buildOrderBy() public méthode

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

Property Details

$db public_oe property

the database connection.
public $db