0 follower

Final Class Yiisoft\Db\Pgsql\Builder\ArrayValueBuilder

InheritanceYiisoft\Db\Pgsql\Builder\ArrayValueBuilder » Yiisoft\Db\Expression\Value\Builder\AbstractArrayValueBuilder

Builds expressions for {@see ArrayValue} for PostgreSQL Server.

Method Details

Hide inherited methods

buildStringValue() protected method

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;
}

            
buildSubquery() protected method

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);
}

            
buildValue() protected method

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);
}

            
getLazyArrayValue() protected method

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();
}