Allowed conversions of java.time Objects
Mark Rotteveel
mark at lawinegevaar.nl
Wed Feb 12 13:28:05 PST 2014
I am currently implementing some of the new java.time conversions for
JDBC 4.2 and I am wondering if there might be some conversions missing
from the changelog.
According to the changelog
(https://jcp.org/aboutJava/communityprocess/maintenance/jsr221/JDBC4.2MR-Oct232013.pdf)
the Table B-5 mapping for java.time.LocalDate is:
CHAR, VARCHAR, LONGVARCHAR and DATE
In this list I'd also expect TIMESTAMP (as a similar mapping does exist
for java.sql.Date).
Similarly the mapping for LocalTime also misses TIMESTAMP (as does exist
for java.sql.Time).
Is this intentional, or an omission? If the former: what is the rationale?
Similarly: shouldn't a conversion from OffsetTime and OffsetDateTime to
TIME respectively TIMESTAMP be allowed as well?
PS Also note that the changelog talks about javax.time, while the JSR
310 classes are in java.time
--
Mark Rotteveel
More information about the jdbc-spec-discuss
mailing list