Derby
  1. Derby
  2. DERBY-6070

Document Derby's JDBC 4.2 implementation

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: Documentation
    • Labels:
      None
    • Urgency:
      Normal

      Description

      We may want to document the following specifics of Derby's JDBC 4.2 implementation:

      — DatabaseMetaData.getMaxLogicalLobSize() —

      This is a new method added by JDBC 4.2. The javadoc for this method is terse:

      "long getMaxLogicalLOBSize()
      throws SQLException

      Retrieves the maximum number of bytes this database allows for the logical size for a LOB.

      Returns:
      the maximum number of bytes allowed; a result of zero means that there is no limit or the limit is not known
      Throws:
      SQLException - if a database access error occurs"

      Derby returns 0. The meaningful limits on Derby's BLOB and CLOB datatypes are documented in the datatype section of the Reference Manual.

      — SQLType —

      JDBC 4.2 introduces a new datatype identifier (java.sql.SQLType) to help databases describe datatypes which don't appear in the ANSI/ISO SQL Standard. The idea is that databases with non-standard types can provide their own implementations of SQLType. JDBC 4.2 also supplies its own implementation (java.sql.JDBCType) which provides an enum for each of the type ids in java.sql.Types.

      Derby doesn't expose any datatypes which aren't represented by JDBCType enums and so Derby doesn't need to provide its own implementation of SQLType.

      Overloads with SQLType arguments have been added to various interfaces, alongside the existing methods which take int type ids from java.sql.Types. The affected interfaces are: CallableStatement, PreparedStatement, and ResultSet. On Derby, these methods raise an "unsupported datatype" exception (SQLState 0A000) if the caller passes in a bad SQLType, namely:

      1) A SQLType from a foreign database. That is a SQLType which isn't one of the JDBCType enums.

      2) A JDBCType enum whose corresponding int type id (from java.sql.Types) isn't supported by Derby. The supported int type ids are documented in the datatype section of the Reference Manual. The JDBCType enums have the same names as their corresponding int ids in java.sql.Types.

      1. DERBY-6070.diff
        7 kB
        Kim Haase
      2. DERBY-6070.stat
        0.1 kB
        Kim Haase
      3. DERBY-6070.zip
        4 kB
        Kim Haase

        Issue Links

          Activity

          Rick Hillegas created issue -
          Rick Hillegas made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-6000 [ DERBY-6000 ]
          Kim Haase made changes -
          Assignee Kim Haase [ chaase3 ]
          Hide
          Kim Haase added a comment -

          Attaching DERBY-6070.diff, DERBY-6070.stat, and DERBY-6070.zip. I created two new topics for the DatabaseMetaData and SQLType features.

          A src/ref/rrefjdbc4_2sqltype.dita
          A src/ref/rrefjdbc4_2databasemetadata.dita
          M src/ref/refderby.ditamap

          Comments are welcome!

          Show
          Kim Haase added a comment - Attaching DERBY-6070 .diff, DERBY-6070 .stat, and DERBY-6070 .zip. I created two new topics for the DatabaseMetaData and SQLType features. A src/ref/rrefjdbc4_2sqltype.dita A src/ref/rrefjdbc4_2databasemetadata.dita M src/ref/refderby.ditamap Comments are welcome!
          Kim Haase made changes -
          Attachment DERBY-6070.diff [ 12570126 ]
          Attachment DERBY-6070.stat [ 12570127 ]
          Attachment DERBY-6070.zip [ 12570128 ]
          Kim Haase made changes -
          Issue & fix info Patch Available [ 10102 ]
          Hide
          Rick Hillegas added a comment -

          Thanks, Kim. These changes look good to me. +1

          Show
          Rick Hillegas added a comment - Thanks, Kim. These changes look good to me. +1
          Hide
          Kim Haase added a comment -

          Thanks again, Rick!

          Committed patch DERBY-6070.diff to documentation trunk at revision 1449763.

          Show
          Kim Haase added a comment - Thanks again, Rick! Committed patch DERBY-6070 .diff to documentation trunk at revision 1449763.
          Kim Haase made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Issue & fix info Patch Available [ 10102 ]
          Fix Version/s 10.10.0.0 [ 12321550 ]
          Resolution Fixed [ 1 ]
          Hide
          Kim Haase added a comment -

          Docs are in the 10.10.1 release.

          Show
          Kim Haase added a comment - Docs are in the 10.10.1 release.
          Kim Haase made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12761179 ] Default workflow, editable Closed status [ 12802517 ]

            People

            • Assignee:
              Kim Haase
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development