pietermartin / sqlg

TinkerPop graph over sql
MIT License
245 stars 51 forks source link

Native UUID supports #361

Closed alendit closed 2 years ago

alendit commented 5 years ago

Some databases, i.e. Postgres have a native UUID type support. Sqlg known the property type UUID, too, but rather converts it to a string before inserting it into the database. Using a native type would have obvious performance benefits, equality and comparison operations on UUID are vastly faster than they are on string on considerable length.

I propose to add a supportsUUID flag to the SqlDialect and change add a check in setKeyValueAsParameter for it. With some other minor changes we can get UUID support.

If this approach is fine, I'll send a PR.

pietermartin commented 5 years ago

Yeah sounds good, thanks.