JsonExpressionBuilder
API reference › yii › db › pgsql › JsonExpressionBuilder
Class JsonExpressionBuilder builds JsonExpression for PostgreSQL DBMS.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$queryBuilder protected | yii\ | Default: null. | yii\ |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | ExpressionBuilderTrait constructor. | yii\ |
build() | Method builds the raw SQL from the $expression that will not be additionally escaped or quoted. | JsonExpressionBuilder |
getTypecast() protected | JsonExpressionBuilder |
Method details
Section titled “Method details”build()
Section titled “build() ”public function build(yii\db\JsonExpression|yii\db\ExpressionInterface $expression, array &$params = []): stringMethod builds the raw SQL from the $expression that will not be additionally escaped or quoted.
Parameters
| Parameter | Type | Description |
|---|---|---|
$expression | yii\|yii\ | The expression to be built |
$params | array | The binding parameters. |
Returns
string: The raw SQL that will not be additionally escaped or quoted.
getTypecast()
Section titled “getTypecast() ”protected function getTypecast(yii\db\JsonExpression $expression): stringParameters
| Parameter | Type | Description |
|---|---|---|
$expression | yii\ |
Returns
string: The typecast expression based on type.