Issue Details (XML | Word | Printable)

Key: JDBC-339
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver
JDBC-338

Add basic java.time support for setObject() to Jaybird 2.2

Created: 13/Feb/14 08:12 PM   Updated: 27/Apr/14 01:41 PM
Component/s: JDBC driver
Affects Version/s: Jaybird 2.1.6, Jaybird 2.2, Jaybird 2.2.1, Jaybird 2.2.2, Jaybird 2.2.3, Jaybird 2.2.4
Fix Version/s: Jaybird 2.2.5

Time Tracking:
Not Specified


 Description  « Hide
Add basic java.time support for setObject() to Jaybird 2.2.

The current implementation is missing some existing required conversions (notably ResultSet.getObject(int/String, Class<?>)), so we leave that out for now (should be tackled in the parent issue for Jaybird 3.0 or a later Jaybird 2.2.x)

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 13/Feb/14 10:35 PM
Implementation added to Jaybird 2.2.5. Skeleton implementation without actual JDBC 4.2 added to Jaybird 3.0. JDBC 4.2 support will be frontported to Jaybird 3.0 once the new wire protocol is in place.

Mark Rotteveel added a comment - 27/Mar/14 08:31 PM
Current conversion for java.time types might not be optimal. The current conversion is from java.time.LocalDateTime to java.sql.Timestamp, from java.time.LocalDate to java.sql.Date and from java.time.LocalTime to java.sql.Time before storing in the database. It might be better to do the conversion directly, as this avoids potential interference of the current JVM timezone when interpreting time, and truncation of subsecond values.

Mark Rotteveel added a comment - 30/Mar/14 01:15 PM
Added direct implementation in Java 8 + increased java.sql.Timestamp precision from 1 millisecond to 100 microseconds (Firebird maximum precision).