blob encode uuids if stored as binary #173
Draft
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.
Marking as a draft because I actually don't know if this is the correct solution
I'm using https://github.com/sloanelybutsurely/typeid-elixir which implements an
Ecto.ParameterizedTypethat can be either a:stringor:uuidtype. As strings they look like "user_01jz8mgbxkevwagbhr8cdqhpqh"I want to use
ecto_sqlite3withuuid_type: :binaryfor efficiency reasonsStoring the TypeID as
:uuidwill drop the prefix, leaving only the suffix "01jz8mgbxkevwagbhr8cdqhpqh", then convert that suffix from base32 to binary uuidv7 — but Ecto blows up inSTRICTtables withBLOBcolumns becausetypeid_elixiris unawareexqliteneeds to receive{:blob, value}, not onlyvalue(binary uuidv7).I've added blob encoding to the dumper pipeline, but again, maybe this is not the correct solution.