[
https://issues.apache.org/jira/browse/DERBY-6445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17849273#comment-17849273
]
Philippe Marschall commented on DERBY-6445:
-------------------------------------------
I attached a patch.
It contains:
- Support for both embedded and client mode.
- Support for both {{ResultSet}} and {{CallableStatement}}.
- Support for {{#getObject}}, {{#setObject}} and {{#updateObject}}.
The code avoids converting through {{java.sql}} types or {{Calendar}} and
instead uses {{java.time}} types directly. Care has been taken to not affect
existing code paths.
Limitations:
- {{#updateObject}} goes through the {{java.sql}} types, meaning to introduces
the limitations of the {{java.sql}} times. I assume the method is used rarely
enough so that this is acceptable. If not storing {{DateTimeValue}} instead of
{{java.sql}} types in {{ClientResultSet.updatedColumns_}} would be an option.
- Java stored procedure implementations do not yet support java.time
parameters. This would be more involved as method lookup would have to be
updated and input/output conversion would have to happen.
> JDBC 4.2: Add support for new date and time classes
> ---------------------------------------------------
>
> Key: DERBY-6445
> URL: https://issues.apache.org/jira/browse/DERBY-6445
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.10.1.1
> Reporter: Knut Anders Hatlen
> Priority: Major
> Attachments: DERBY-6445.patch, Derby-6445.html, Derby-6445.html
>
>
> JDBC 4.2 added type mappings for new date and time classes found in Java 8.
> Derby should support these new mappings.
> This would at least affect Derby's implementation of the various getObject(),
> setObject() and setNull() methods in ResultSet, PreparedStatement and
> CallableStatement.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)