Skip to content
PHP Ecosystem
Explore

QueryExpressionBuilder

API reference › yii › db › QueryExpressionBuilder

classyii\db\QueryExpressionBuilder
ImplementsExpressionBuilderInterface
Uses traitsExpressionBuilderTrait
Since2.0.14
Sourceframework/db/QueryExpressionBuilder.php

Class QueryExpressionBuilder is used internally to build Query object using unified QueryBuilder expression building interface.

PropertyTypeDescriptionDefined by
$queryBuilder protectedQueryBuilderDefault: null.ExpressionBuilderTrait
MethodDescriptionDefined by
__construct()ExpressionBuilderTrait constructor.ExpressionBuilderTrait
build()Method builds the raw SQL from the $expression that will not be additionally escaped or quoted.QueryExpressionBuilder
public function build(yii\db\ExpressionInterface|yii\db\Query $expression, array &$params = []): string

Method builds the raw SQL from the $expression that will not be additionally escaped or quoted.

Parameters

ParameterTypeDescription
$expressionExpressionInterface|QueryThe expression to be built.
$paramsarrayThe binding parameters.

Returns

string: The raw SQL that will not be additionally escaped or quoted.