Fork me on GitHub
#sql
<
2021-02-26
>
mg01:02:07

Anyone had luck getting H2 timestamp with time zone columns to read into a useful datatype with next.jdbc? By default these are being read as org.h2.api.TimestampWithTimeZone. The H2 docs claim that they can be mapped to java.time objects but haven't found anything that explains how to make that happen

mg01:02:07

Ah, thanks. Sort of the hammer approach there. I'll try it 😄

seancorfield01:02:03

@michael.gaare Did you try requiring next.jdbc.date-time?

seancorfield01:02:41

(I'm curious whether that ns provides any automation for that particular case)

mg02:02:01

@seancorfield yes, I did, and it does not

mg02:02:07

Unfortunately, org.h2.api.TimestampWithTimeZone is not in the class hierarchy of anything that next.jdbc.date-time touches

mg02:02:28

it's something of a bizarre data type to be honest

emccue02:02:21

honestly thats fine

emccue02:02:48

points to the design of next.jdbc for making that transparent

seancorfield02:02:19

@michael.gaare Yeah, some of the JDBC drivers have the weirdest custom classes 😞