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

Document Derby's JDBC 4.2 implementation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.10.1.1
    • 10.10.1.1
    • Documentation
    • None
    • 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.

      Attachments

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

        Issue Links

          Activity

            People

              chaase3 Camilla Haase
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: