You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Philippe Marschall (JIRA)" <ji...@apache.org> on 2017/01/22 12:31:26 UTC

[jira] [Created] (DERBY-6920) Add input support for new date and time classes

Philippe Marschall created DERBY-6920:
-----------------------------------------

             Summary: Add input support for new date and time classes
                 Key: DERBY-6920
                 URL: https://issues.apache.org/jira/browse/DERBY-6920
             Project: Derby
          Issue Type: Improvement
          Components: JDBC
            Reporter: Philippe Marschall
         Attachments: jsr-310-input.diff

This is the first half of DERBY-6445. The patch adds support for the new date and time classes for input only. I may add output support later but for now splitting it up makes for a smaller, easier to review and implement patch.

A couple of notes about the implementation:

* as the project now requires Java 1.8 I added the code directly to the classes
* the existing tests are expanded
* I avoided calling the provided #valueOf conversion methods for several reasons:
** LocalTime has nanosecond resolution but java.sql.Time only has millisecond resolution
** LocalDateTime can represent timestamps that can not be represented by java.sql.Timestamp because they fall into a daylight saving time transition
** Performance should be much better since creating a DateTimeValue instance is a simple matter of calling a few getters. No calculation or object creation is involved.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)