ArrayExpressionBuilder
API reference › yii › db › pgsql › ArrayExpressionBuilder
Class ArrayExpressionBuilder builds ArrayExpression 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. | ArrayExpressionBuilder |
buildPlaceholders() protected | Builds placeholders array out of $expression values | ArrayExpressionBuilder |
buildSubqueryArray() protected | Build an array expression from a subquery SQL. | ArrayExpressionBuilder |
getTypehint() protected | ArrayExpressionBuilder | |
typecastValue() protected | Casts $value to use in $expression | ArrayExpressionBuilder |
Method details
Section titled “Method details”build()
Section titled “build() ”public function build(yii\db\ArrayExpression|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.
buildPlaceholders()
Section titled “buildPlaceholders() ”protected function buildPlaceholders(yii\db\ExpressionInterface|yii\db\ArrayExpression $expression, array &$params): arrayBuilds placeholders array out of $expression values
Parameters
| Parameter | Type | Description |
|---|---|---|
$expression | yii\|yii\ | |
$params | array | The binding parameters. |
Returns
array
buildSubqueryArray()
Section titled “buildSubqueryArray() ”protected function buildSubqueryArray(string $sql, yii\db\ArrayExpression $expression): stringBuild an array expression from a subquery SQL.
Parameters
| Parameter | Type | Description |
|---|---|---|
$sql | string | The subquery SQL. |
$expression | yii\ |
Returns
string: The subquery array expression.
getTypehint()
Section titled “getTypehint() ”protected function getTypehint(yii\db\ArrayExpression $expression): stringParameters
| Parameter | Type | Description |
|---|---|---|
$expression | yii\ |
Returns
string: The typecast expression based on type.
typecastValue()
Section titled “typecastValue() ”protected function typecastValue(yii\db\ArrayExpression $expression, mixed $value): mixedCasts $value to use in $expression