Hi Lukas, thanks for the incredibly fast reply! Since we're using H2 only for testing purposes, I tried the latest git version and indeed, there's "timestamp with time zone" available. However, the javadoc for the time parsing function in h2 states:
> Parse a time string. The format is: [-]hour:minute:second[.nanos] ... > And jooq tries to pass, for instance, '1987-08-21T00:00Z', so I get the error: org.jooq.exception.DataAccessException: SQL [null]; Cannot parse "TIMESTAMP > WITH TIMEZONE" constant "1987-08-21T00:00Z"; Could this be a bug in jooq, then? Philipp Am Donnerstag, 26. Mai 2016 10:49:47 UTC+2 schrieb Lukas Eder: > > Hi Philipp, > > Yes, you can implement dialect-specific logic in data type bindings > (org.jooq.Binding). Converters are just a very much simplified version for > simple use-cases. More information here: > > http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-bindings > > Let me know if you need more help. > > By the way, Thomas Müller from H2 is just now working on this feature. I > think there's some experimental support for TIMESTAMP WITH TIME ZONE in the > latest version > > Lukas > > 2016-05-26 9:12 GMT+02:00 Philipp Middendorf <[email protected] > <javascript:>>: > >> Hi! >> >> I'm using H2 and Postgres as data base backends, using the same DDL >> script to initialize both. With columns of type "TIMESTAMP WITH TIME ZONE", >> Postgres indeed creates a column of this type. H2, however, doesn't >> complain and creates a column *without* a time zone. The column >> SQLDataType is TIMESTAMPWITHTIMEZONE and I'm using OffsetDateTime as the >> backing data type. However, this leads to a parse error because apparently, >> H2 returns an ISO time stamp without a time zone at the end. >> >> Long story short, is it possible to attach a dialect-dependent converter >> to my column, so I can treat H2 different from Postgres and the others? Or >> is there an even better solution? >> >> Regards >> Philipp >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jOOQ User Group" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
