Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6920

Add input support for new date and time classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • None
    • None
    • JDBC
    • None
    • Patch

    Description

      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.

      Attachments

        1. jsr-310-input.diff
          9 kB
          Philippe Marschall

        Issue Links

          Activity

            People

              Unassigned Unassigned
              marschall Philippe Marschall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: