sql

All things SQL and JDBC...
mg 2021-02-26T01:11:07.088100Z

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

mg 2021-02-26T01:17:07.088800Z

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

seancorfield 2021-02-26T01:43:03.089300Z

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

seancorfield 2021-02-26T01:43:41.089800Z

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

mg 2021-02-26T02:12:01.090Z

@seancorfield yes, I did, and it does not

mg 2021-02-26T02:13:07.091200Z

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

mg 2021-02-26T02:13:28.091600Z

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

emccue 2021-02-26T02:25:21.092Z

honestly thats fine

emccue 2021-02-26T02:25:48.092400Z

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

seancorfield 2021-02-26T02:26:19.093100Z

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