Final Class Yiisoft\Db\Pgsql\Builder\ArrayValueBuilder
| Inheritance | Yiisoft\Db\Pgsql\Builder\ArrayValueBuilder » Yiisoft\Db\Expression\Value\Builder\AbstractArrayValueBuilder |
|---|
Builds expressions for {@see ArrayValue} for PostgreSQL Server.
Protected Methods
Method Details
| protected string buildStringValue ( string $value, \Yiisoft\Db\Expression\Value\ArrayValue $expression, array &$params ) | ||
| $value | string | |
| $expression | \Yiisoft\Db\Expression\Value\ArrayValue | |
| $params | array | |
protected function buildStringValue(string $value, ArrayValue $expression, array &$params): string
{
$param = new Param($value, DataType::STRING);
$column = $this->getColumn($expression);
$dbType = $this->getColumnDbType($column);
$typeHint = $this->getTypeHint($dbType, $column?->getDimension() ?? 1);
return $this->queryBuilder->bindParam($param, $params) . $typeHint;
}
| protected string buildSubquery ( \Yiisoft\Db\Query\QueryInterface $query, \Yiisoft\Db\Expression\Value\ArrayValue $expression, array &$params ) | ||
| $query | \Yiisoft\Db\Query\QueryInterface | |
| $expression | \Yiisoft\Db\Expression\Value\ArrayValue | |
| $params | array | |
protected function buildSubquery(QueryInterface $query, ArrayValue $expression, array &$params): string
{
$column = $this->getColumn($expression);
$dbType = $this->getColumnDbType($column);
return $this->buildNestedSubquery($query, $dbType, $column?->getDimension() ?? 1, $params);
}
| protected string buildValue ( iterable $value, \Yiisoft\Db\Expression\Value\ArrayValue $expression, array &$params ) | ||
| $value | iterable | |
| $expression | \Yiisoft\Db\Expression\Value\ArrayValue | |
| $params | array | |
protected function buildValue(iterable $value, ArrayValue $expression, array &$params): string
{
$column = $this->getColumn($expression);
$dbType = $this->getColumnDbType($column);
return $this->buildNestedValue($value, $dbType, $column?->getColumn(), $column?->getDimension() ?? 1, $params);
}
| protected array|string getLazyArrayValue ( \Yiisoft\Db\Schema\Data\LazyArrayInterface $value ) | ||
| $value | \Yiisoft\Db\Schema\Data\LazyArrayInterface | |
protected function getLazyArrayValue(LazyArrayInterface $value): array|string
{
if ($value instanceof LazyArray) {
return $value->getRawValue();
}
return $value->getValue();
}
Signup or Login in order to comment.