prisma / quaint

SQL Query AST and Visitor for Rust
Apache License 2.0
583 stars 61 forks source link

Support Uuid_to_bin in MySQL #346

Closed cprieto closed 2 years ago

cprieto commented 2 years ago

MySQL is the only main used database returning Uuid as a string, so they created an additional function, uuid_to_bin, to convert the string value to binary. This is a "feature" required for https://github.com/prisma/prisma/issues/7010.

This is the clearer of all the options... Another set of ideas could be:

At the end this was the clearer, of course it has a few tradeoffs:

This applies as well for the MySQL function uuid which generates a string instead of a binary