decide on handling of unsupported data types in JDBC (ZonedDateTime, Instant and OffsetTime), UUID in MySQL
According to https://jdbc.postgresql.org/documentation/head/java8-date-time.html, ZonedDateTime, Instant and OffsetTime are not supported by JDBC. Some databases will likely support these types if we bypass the JDBC driver (everything else is platform specific, why not executor as well :D) . A couple of options:
- have some reasonable defaults e.g. Use an instant stored as an integer type or timestamp at UTC, zoned date time might use a timestamp which is always UTC
- remove these types from the default type tags and implement them separately as platform specific extensions
- allow users to define how they'd like them stored using a typeclass or something?
- do something crazy like having two columns (with one to store tz information) accessed as if it's one by zio-sql (I don't think this is a good idea...)
1 and 2 would require good documentation and consistent handling across the types. 3 & 4 are probably unideal...
@jczuchnowski / @jdegoes any thoughts on this?
In #321 @andrewhj pointed out MySQL doesn't support UUID directly, so that's another one we'll have to tackle.
https://github.com/zio/zio-sql/pull/321#issuecomment-733524550
Need more research if the way we're handling it now is correct. Specific tests would be good.