Final Class Yiisoft\Db\Pgsql\Builder\StructuredValueBuilder
| Inheritance | Yiisoft\Db\Pgsql\Builder\StructuredValueBuilder » Yiisoft\Db\Expression\Value\Builder\AbstractStructuredValueBuilder |
|---|
Builds expressions for {@see StructuredValue} for PostgreSQL Server.
Protected Methods
Method Details
| protected string buildStringValue ( string $value, \Yiisoft\Db\Expression\Value\StructuredValue $expression, array &$params ) | ||
| $value | string | |
| $expression | \Yiisoft\Db\Expression\Value\StructuredValue | |
| $params | array | |
protected function buildStringValue(string $value, StructuredValue $expression, array &$params): string
{
$param = new Param($value, DataType::STRING);
return $this->queryBuilder->bindParam($param, $params) . $this->getTypeHint($expression);
}
| protected string buildSubquery ( \Yiisoft\Db\Query\QueryInterface $query, \Yiisoft\Db\Expression\Value\StructuredValue $expression, array &$params ) | ||
| $query | \Yiisoft\Db\Query\QueryInterface | |
| $expression | \Yiisoft\Db\Expression\Value\StructuredValue | |
| $params | array | |
protected function buildSubquery(QueryInterface $query, StructuredValue $expression, array &$params): string
{
[$sql, $params] = $this->queryBuilder->build($query, $params);
return "($sql)" . $this->getTypeHint($expression);
}
| protected string buildValue ( array|object $value, \Yiisoft\Db\Expression\Value\StructuredValue $expression, array &$params ) | ||
| $value | array|object | |
| $expression | \Yiisoft\Db\Expression\Value\StructuredValue | |
| $params | array | |
protected function buildValue(array|object $value, StructuredValue $expression, array &$params): string
{
$value = $this->prepareValues($value, $expression);
/** @psalm-var string[] $placeholders */
$placeholders = $this->buildPlaceholders($value, $expression, $params);
return 'ROW(' . implode(',', $placeholders) . ')' . $this->getTypeHint($expression);
}
| 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 StructuredLazyArray) {
return $value->getRawValue();
}
return $value->getValue();
}
Signup or Login in order to comment.