-
-
Notifications
You must be signed in to change notification settings - Fork 607
Open
Description
Motivation
Storing Uuids as TEXT
columns in SQLite has two advantages:
- Easier to debug the DB using the
sqlite3
command directly - Allows for queries like
WHERE id IN (<uuid>, <uuid>, ...)
which are hard (maybe impossible?) to write withBLOB
values
Proposed Solutions
I have multiple ideas for solving this:
- sqlx will store
fmt
Uuid types such asHyphenated
asTEXT
. SeaORM already supports using these types for column definitions, but still stores them asBLOB
(tested with version 1.1.15). SeaORM could store them as text instead. - Allow overriding the column type of any Uuid column:
On 1.1.15 this compiles, but still tries to store the Uuid as
#[sea_orm(column_type = "Text")] pub id: Uuid
BLOB
at runtime.
Are there thoughts on this? If anybody can give me a hint on which solution would be preferred, I could try to open a PR :)
Metadata
Metadata
Assignees
Labels
No labels