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

EmbedDatabaseMetadata, EmbedDatabaseMetadata40, and client.net.NetDatabaseMetadata40 should not throw a "not implemented" exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.2.1.6
    • 10.2.1.6
    • JDBC
    • None

    Description

      Per this email from Lance Andersen, JDBC4 spec lead:

      "The JDBC spec requires DatabaseMetaData to be fully implemented.

      For non DatabaseMetaData methods not implement and not required, a SQLException must be thrown and in the case of JDBC 4.0 SQLFeatureNotSupportedException must be thrown.

      Any drivers which fail to implement DatabaseMetaData methods and throw an Exception would not pass the conformance tests.

      HTH

      Lance"

      These metadata calls need to be modified to return either true/false for boolean methods, or an empty result set for methods that return result sets.

      The client.am.DatabaseMetadata.getSuperTypes() has a good example of how to generate an empty result set:

      String sql = "SELECT CAST(NULL AS VARCHAR(128)) AS TYPE_CAT," +
      "CAST(NULL AS VARCHAR(128)) AS TYPE_SCHEM," +
      "VARCHAR('', 128) AS TYPE_NAME," +
      "CAST(NULL AS VARCHAR(128)) AS SUPERTYPE_CAT," +
      "CAST(NULL AS VARCHAR(128)) AS SUPERTYPE_SCHEM," +
      "VARCHAR('', 128) AS SUPERTYPE_NAME " +
      "FROM SYSIBM.SYSDUMMY1 WHERE 1=0 WITH UR ";

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              davidvc David Van Couvering
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: