RT.Comb icon indicating copy to clipboard operation
RT.Comb copied to clipboard

MySql Support

Open raedabusanad opened this issue 3 years ago • 2 comments

Hello,

Based on the documentation under security and performance, can i use it with MySQL but store the UUID as BINARY(16)? if not, when you planning to support MySql?

Many Thanks RA

raedabusanad avatar Oct 31 '21 09:10 raedabusanad

Hi,

I haven't used MySQL in many, many years -- not since I was playing around with WordPress. I know nothing about how/whether it supports UUIDs, whether they can be used as primary keys, sorting, etc.

I'll leave this open, but it'll need some work by others who are more familiar with that platform or who want to dig into adding support for it.

richardtallent avatar Nov 03 '21 03:11 richardtallent

Late to the party, but RT.Comb.Provider.PostgreSql.Create() is what one should use for MySQL. MySQL stores UUIDs as BIN(16) columns and one can use BIN_TO_UUID() and UUID_TO_BIN() functions in MySQL 8+.

Since RT.Comb.Provider.PostgreSql.Create() creates a UUID v7, perhaps one should add a "RT.Comb.Provider.UUIDv7" to make it a DB agnostic provider?

Also alias the Sql provider with "MsSql" to make it clearer?

Great library, just a thought. :)

gabephudson avatar May 20 '24 21:05 gabephudson