Skip to content
PHP Ecosystem
Explore

JsonExpressionBuilder

API reference › yii › db › mysql › JsonExpressionBuilder

classyii\db\mysql\JsonExpressionBuilder
Implementsyii\db\ExpressionBuilderInterface
Uses traitsyii\db\ExpressionBuilderTrait
Since2.0.14
Sourceframework/db/mysql/JsonExpressionBuilder.php

Class JsonExpressionBuilder builds JsonExpression for MySQL DBMS.

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

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

Parameters

ParameterTypeDescription
$expressionyii\db\JsonExpression|yii\db\ExpressionInterfaceThe expression to be built
$paramsarrayThe binding parameters.

Returns

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