Final Class Yiisoft\Db\Pgsql\Builder\ArrayValueBuilder
| Inheritance | Yiisoft\ |
|---|
Builds expressions for {@see ArrayValue} for PostgreSQL Server.
Protected Methods
Method Details
| protected string buildStringValue ( string $value, \ | ||
| $value | string | |
| $expression | \ |
|
| $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 ( \ | ||
| $query | \ |
|
| $expression | \ |
|
| $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, \ | ||
| $value | iterable | |
| $expression | \ |
|
| $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 ( \ | ||
| $value | \ |
|
protected function getLazyArrayValue(LazyArrayInterface $value): array|string
{
if ($value instanceof LazyArray) {
return $value->getRawValue();
}
return $value->getValue();
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.