Final Class Yiisoft\Db\Sqlite\Builder\UuidValueBuilder
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Builds a {@see UuidValue} expression for SQLite.
SQLite stores a UUID as 16 raw bytes in a blob(16) column, so the canonical string form is converted to bytes and
bound as {@see \
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| build() | Yiisoft\ |
Method Details
| public mixed __construct ( \ | ||
| $queryBuilder | \ |
|
public function __construct(
private readonly QueryBuilderInterface $queryBuilder,
) {}
| public string build ( \ | ||
| $expression | \ |
|
| $params | array | |
public function build(ExpressionInterface $expression, array &$params = []): string
{
/** @var UuidValue $expression */
return $this->queryBuilder->bindParam(
new Param(DbUuidHelper::uuidToBlob($expression->value), DataType::LOB),
$params,
);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.