Derby
  1. Derby
  2. DERBY-946

Miscellaneous DatabaseMetaData methods added by JDBC 4

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.2.1.6
    • Component/s: JDBC
    • Labels:
      None

      Description

      As described in the JDBC4 spec, sections 7 and 3.1.

      This addresses new JDBC4 methods in DatabaseMetaData not addressed by other JIRAs, including:

      o autoCommitFailureClosesAllResultSets().
      o supportsStoredFunctionsUsingCallSyntax().
      o new getSchemas() overload

        Issue Links

          Activity

          Hide
          Rick Hillegas added a comment -

          Sub-issues closed.

          Show
          Rick Hillegas added a comment - Sub-issues closed.
          Hide
          Rick Hillegas added a comment -

          In addition to the new columns in getProcedures() and getProcedureColumns() (addressed by DERBY-925), this spec change clarifies the behavior of getTypeInfo(), getCrossReference(), and getColumns(). These clarifications do not create extra work for us, for the following reasons:

          o getTypeIno() - This clarification only affects databases which implement SQL DISTINCT and STRUCT types. Derby does not implement these.

          o getCrossReference() - Derby implements the specified behavior for foreign key metadata.

          o getColumns() - Derby implements the correct metadatga behavior for String DEFAULTs.

          Show
          Rick Hillegas added a comment - In addition to the new columns in getProcedures() and getProcedureColumns() (addressed by DERBY-925 ), this spec change clarifies the behavior of getTypeInfo(), getCrossReference(), and getColumns(). These clarifications do not create extra work for us, for the following reasons: o getTypeIno() - This clarification only affects databases which implement SQL DISTINCT and STRUCT types. Derby does not implement these. o getCrossReference() - Derby implements the specified behavior for foreign key metadata. o getColumns() - Derby implements the correct metadatga behavior for String DEFAULTs.
          Hide
          David Van Couvering added a comment -

          I'm moving back to i18n work and am releasing "ownership" of this item

          Show
          David Van Couvering added a comment - I'm moving back to i18n work and am releasing "ownership" of this item
          Hide
          David Van Couvering added a comment -

          One could argue that this can remain open and we would have support for JDBC4 metadata, but I think it's a real issue in terms of JDBC compatibility. So, I'm associating the two bugids, with no condition that this be fixed before DERBY-946 is marked resolved.

          Show
          David Van Couvering added a comment - One could argue that this can remain open and we would have support for JDBC4 metadata, but I think it's a real issue in terms of JDBC compatibility. So, I'm associating the two bugids, with no condition that this be fixed before DERBY-946 is marked resolved.
          Hide
          Rick Hillegas added a comment -

          From section 7 of the JDBC4 spec:

          42 JDBC 4.0 Specification ? October 2005
          7.7 New Methods
          The JDBC 4.0 API introduces the following new DatabaseMetaData methods:
          ? getSchemas ? Overloaded the existing getSchemas() method to take a
          catalog and schema as arguments.
          ? supportsStoredFunctionsUsingCallSyntax ? Method used to indicate
          whether user-defined or vendor functions may be called using the stored
          procecure escape syntax.
          ? autoCommitFailureClosesAllResultSets ? Method used to indicate
          whether a SQLException while autoCommit is true indicates that all open
          ResultSets are closed, even ones that are holdable.
          ? providesQueryObjectGenerator ? Method used to indicate whether a
          JDBC driver provides its own QueryObjectGenerator implementation.
          ? getClientInfoProperties ? Method used to indicate the list of client info
          properties that the driver supports.
          A complete definition of these methods may be found in the JDBC 4.0 API
          specification (javadoc).
          7.8 Modified Methods
          The JDBC 4.0 API modifies the definitions of these existing DatabaseMetaData
          methods:
          ? getTypeInfo ? Clarified to indicate that if the database supports SQL distinct
          types, then getTypeInfo() will return a single row with a TYPE_NAME of
          DISTINCT and a DATA_TYPE of Types.DISTINCT. If the database supports SQL
          structured types, then getTypeInfo() will return a single row with a TYPE_NAME
          of STRUCT and a DATA_TYPE of Types.STRUCT. Support has also been added
          for the new data types SQLXML and ROWID.
          ? getCrossReference ? Clarified that the method retrieves a description of the
          foreign key columns in the given foreign key table that reference the primary key
          or the unique constraint columns of the parent table (could be the same or a
          different table). The number of columns returned from the parent table must
          match the number of columns that make up the foreign key. They are ordered by
          FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.
          ? getColumns ? Clarified that the return value for COLUMN_DEF that the
          default value for the column, should be interpreted as a string when the value is
          enclosed in quotes.
          ? getProcedures ? Added the column SPECIFIC_NAME. The ordering of the
          returned rows is now by PROCEDURE_SCHEM, PROCEDURE_NAME and
          SPECIFIC_ NAME.
          ? getProcedureColumns ? Added the columns COLUMN_DEF,
          SQL_DATATYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH,
          ORDINAL_POSITION, IS_NULLABLE and SPECIFIC_NAME. The ordering of
          the returned rows is now by PROCEDURE_SCHEM, PROCEDURE_NAME and
          SPECIFIC_ NAME.
          The JDBC 4.0 API specification includes updated definitions of these methods.

          Show
          Rick Hillegas added a comment - From section 7 of the JDBC4 spec: 42 JDBC 4.0 Specification ? October 2005 7.7 New Methods The JDBC 4.0 API introduces the following new DatabaseMetaData methods: ? getSchemas ? Overloaded the existing getSchemas() method to take a catalog and schema as arguments. ? supportsStoredFunctionsUsingCallSyntax ? Method used to indicate whether user-defined or vendor functions may be called using the stored procecure escape syntax. ? autoCommitFailureClosesAllResultSets ? Method used to indicate whether a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdable. ? providesQueryObjectGenerator ? Method used to indicate whether a JDBC driver provides its own QueryObjectGenerator implementation. ? getClientInfoProperties ? Method used to indicate the list of client info properties that the driver supports. A complete definition of these methods may be found in the JDBC 4.0 API specification (javadoc). 7.8 Modified Methods The JDBC 4.0 API modifies the definitions of these existing DatabaseMetaData methods: ? getTypeInfo ? Clarified to indicate that if the database supports SQL distinct types, then getTypeInfo() will return a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT. If the database supports SQL structured types, then getTypeInfo() will return a single row with a TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT. Support has also been added for the new data types SQLXML and ROWID. ? getCrossReference ? Clarified that the method retrieves a description of the foreign key columns in the given foreign key table that reference the primary key or the unique constraint columns of the parent table (could be the same or a different table). The number of columns returned from the parent table must match the number of columns that make up the foreign key. They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ. ? getColumns ? Clarified that the return value for COLUMN_DEF that the default value for the column, should be interpreted as a string when the value is enclosed in quotes. ? getProcedures ? Added the column SPECIFIC_NAME. The ordering of the returned rows is now by PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_ NAME. ? getProcedureColumns ? Added the columns COLUMN_DEF, SQL_DATATYPE, SQL_DATETIME_SUB, CHAR_OCTET_LENGTH, ORDINAL_POSITION, IS_NULLABLE and SPECIFIC_NAME. The ordering of the returned rows is now by PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_ NAME. The JDBC 4.0 API specification includes updated definitions of these methods.

            People

            • Assignee:
              Unassigned
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development