threeten-jpa
threeten-jpa copied to clipboard
Support Duration and Period with JDBC 4.2
Support Duration and Period with JDBC 4.2 because ojdbc8 supports them.
It's unclear what the JDBC type should be.
I would like to see Duration support for postgres. Couldn't it be serialized via toNanos() and stored as a BIGINT?
@Ramblurr Duration support for PostgreS is something I'd like to do.
Yes mapping nanos to BIGINT would be possible but I feel it's too semantically empty so this is not something I'm keen on doing. What would be more interesting in my opinion is mapping to the PostgreS interval type. I have not yet fully understood the semantics of a PostgreS interval, my current understanding is that it's a Period with sub-day precision.
HSQLDB 2.4.0 does support INTERVAL and Duration and Period as well http://hsqldb.org/doc/guide/sqlgeneral-chapt.html#sgc_interval_typs
So does H2 https://github.com/h2database/h2database/pull/1373