Repository navigation
New: Add MySQL implementation of UuidValue expression - #482
Conversation
MySQL and MariaDB store a UUID as 16 raw bytes in a `binary(16)` column, so `prepareValue()` converts the canonical form with `DbUuidHelper::uuidToBlob()` and binds it as `DataType::LOB`. Requires yiisoft/db#1199.
35ec6c0 to
6cb41c1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #482 +/- ##
=========================================
Coverage 99.10% 99.10%
- Complexity 256 258 +2
=========================================
Files 24 25 +1
Lines 779 786 +7
=========================================
+ Hits 772 779 +7
Misses 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
These The other workflows don't hit it because they install the core from the PR branch: It clears itself once #1199 is merged and 2.0.2 is tagged. If you'd rather see it green before that, adding |
The core UuidValueBuilder is final now, so this builder no longer extends it. Dropping the inheritance keeps the coupling with the core package at the interface.
MySQL/MariaDB half of
UuidValue, added in yiisoft/db#1199 — that PR has to be merged first.Both store a UUID as 16 raw bytes (
ColumnDefinitionBuildermapsColumnType::UUIDtobinary(16)), soprepareValue()converts the canonical form withDbUuidHelper::uuidToBlob()and binds it asDataType::LOBrather than lettingbuildValue()inferDataType::STRING:Verified locally against MySQL 8.4: the round-trip test inserts into a real
binary(16)column and reads back 16 bytes that decode to the original UUID.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.