New: Add SQLite implementation of UuidValue expression - #432
Open
KalimeroMK wants to merge 2 commits into
Open
Conversation
SQLite stores a UUID as 16 raw bytes in a `blob(16)` column, so `prepareValue()` converts the canonical form with `DbUuidHelper::uuidToBlob()` and binds it as `DataType::LOB`. Requires yiisoft/db#1199.
KalimeroMK
force-pushed
the
add-1152-uuid-value
branch
from
September 8, 2026 05:17
938d5ab to
ee901ce
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #432 +/- ##
=========================================
Coverage 98.48% 98.48%
- Complexity 329 330 +1
=========================================
Files 22 23 +1
Lines 1055 1058 +3
=========================================
+ Hits 1039 1042 +3
Misses 16 16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Tigrov
reviewed
Sep 10, 2026
| { | ||
| protected function prepareValue(UuidValue $expression): Param | ||
| { | ||
| return new Param(DbUuidHelper::uuidToBlob($expression->value), DataType::LOB); |
Member
There was a problem hiding this comment.
Will it work when $expression->value is 16 raw bytes or 32 hexadecimal characters? Needs a test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SQLite half of
UuidValue, added in yiisoft/db#1199 — that PR has to be merged first.SQLite stores a UUID as 16 raw bytes (
ColumnDefinitionBuildermapsColumnType::UUIDtoblob(16)), soprepareValue()converts the canonical form withDbUuidHelper::uuidToBlob()and binds it asDataType::LOBrather than lettingbuildValue()inferDataType::STRING:The branch name matches the one in yiisoft/db#1199, so
install-packagesresolves the core package from it and CI runs against the new class.