The new Java 8 API (see #3645) should support generating java.time types by default, rather than the insufficient java.sql types. This is useful when supporting { TIME | TIMESTAMP } WITH TIME ZONE types.
The JDBC spec (http://download.oracle.com/otndocs/jcp/jdbc-4_2-mrel2-eval-spec/index.html) specifies:
java.time.LocalDate to JDBC DATE.java.time.LocalTime to JDBC TIMEjava.time.LocalDateTime to JDBC TIMESTAMP.java.time.OffsetTime to JDBC TIME_WITH_TIMEZONE.java.time.OffsetDateTime to JDBC TIMESTAMP_WITH_TIMEZONE.When will you release v3.7?
I really want to change the time type.
And, could it be easily implement on v 3.6.x?
Thanks a lot for your works.
You can always use Converter for custom java.time types
3.7 is due for the end of September
We won't be able to add support for JSR-310 in jOOQ 3.7's code generator. There are still too many open questions. Only the runtime will be capable of handling these data types.
When implementing date-time handling functions for Java 8, please also keep in mind possibility to use other types such as Instant and Duration (for intervals).
Yes, indeed. Duration corresponds to SQL's INTERVAL DAY TO SECOND, whereas YearMonth corresponds to SQL's INTERVAL YEAR TO MONTH
Is there any progress on this one or do I still need to use custom types?
@eiswind: Unfortunately, no progress yet. Chances are, that jOOQ 3.9 will be delayed a bit to get this in, though. It's really a priority to finally support JSR 310 in jOOQ
This is now implemented as an opt-in flag. With more end user experience, we'll eventually switch the flag's default value to true (https://github.com/jOOQ/jOOQ/issues/5714)
Hi @lukaseder I just wanted to thank you for implementing this feature! I started migrating to jooq a few weeks back and was eagerly looking forward to java.time API support :-)
Many thanks (and apologies for the off-topic comment)!
Hey, you're welcome, "@stupidSheep" :)
Most helpful comment
@eiswind: Unfortunately, no progress yet. Chances are, that jOOQ 3.9 will be delayed a bit to get this in, though. It's really a priority to finally support JSR 310 in jOOQ