Class DBMDWrapper

  • All Implemented Interfaces:
    OptionalTool

    public class DBMDWrapper
    extends java.lang.Object
    implements OptionalTool

    OptionalTool to create wrapper functions which allow you to invoke DatabaseMetaData methods via SQL. The wrapper functions slightly change the signature of the metadata methods as follows:

    • Arguments of type int[] and String[] have been eliminated--they are automatically wildcarded.
    • The method getRowIdLifetime() has been commented out--Derby does not support object types.
    • The method getSchemas() has been commented out--it can be uncommented when the registration logic is made smarter to handle the dropping of different overloads.
    • The method supportsConvert() has been commented out because Derby only allows one function by a given name and the supportsConvert( int, int ) overload is more general.

    Methods which return ResultSet are mapped to table functions. You can join the metadata table functions like this:

     -- list all of the columns in the connected Derby database
     select t.table_schem, t.table_name, c.column_name, c.type_name
     from table( getTables( null, null, null ) ) t,
             table( getColumns( null, null, null, null ) ) c
     where c.table_schem = t.table_schem
     and c.table_name = t.table_name
     and t.table_type = 'TABLE'
     ;
     
     
     -- now list metadata in a foreign database
     call setDatabaseURL( 'com.mysql.jdbc.Driver', 'jdbc:mysql://localhost/world?user=root&password=' );
     
     select t.table_schem, t.table_name, c.column_name, c.type_name
     from table( getTables( 'WORLD', null, null ) ) t,
             table( getColumns( 'WORLD', null, null, null) ) c
     where c.table_name = t.table_name
     and t.table_type = 'TABLE'
     ;
     
     -- release the foreign connection
     call setDatabaseURL( '', '' );
     
    • Constructor Detail

      • DBMDWrapper

        public DBMDWrapper()
        0-arg constructor to satisfy the OptionalTool contract
    • Method Detail

      • loadTool

        public void loadTool​(java.lang.String... configurationParameters)
                      throws java.sql.SQLException
        Description copied from interface: OptionalTool
        Load the tool, giving it optional configuration parameters
        Specified by:
        loadTool in interface OptionalTool
        Throws:
        java.sql.SQLException
      • unloadTool

        public void unloadTool​(java.lang.String... configurationParameters)
                        throws java.sql.SQLException
        Description copied from interface: OptionalTool
        Unload the tool, giving it optional configuration parameters
        Specified by:
        unloadTool in interface OptionalTool
        Throws:
        java.sql.SQLException
      • register

        private void register​(boolean register)
                       throws java.sql.SQLException

        Workhorse to register or unregister all public static methods as Derby routines.

        Throws:
        java.sql.SQLException
      • allProceduresAreCallable

        public static boolean allProceduresAreCallable()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • allTablesAreSelectable

        public static boolean allTablesAreSelectable()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • autoCommitFailureClosesAllResultSets

        public static boolean autoCommitFailureClosesAllResultSets()
                                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • dataDefinitionCausesTransactionCommit

        public static boolean dataDefinitionCausesTransactionCommit()
                                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • dataDefinitionIgnoredInTransactions

        public static boolean dataDefinitionIgnoredInTransactions()
                                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • deletesAreDetected

        public static boolean deletesAreDetected​(int type)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • doesMaxRowSizeIncludeBlobs

        public static boolean doesMaxRowSizeIncludeBlobs()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getAttributes

        public static java.sql.ResultSet getAttributes​(java.lang.String catalog,
                                                       java.lang.String schemaPattern,
                                                       java.lang.String typeNamePattern,
                                                       java.lang.String attributeNamePattern)
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getBestRowIdentifier

        public static java.sql.ResultSet getBestRowIdentifier​(java.lang.String catalog,
                                                              java.lang.String schema,
                                                              java.lang.String table,
                                                              int scope,
                                                              boolean nullable)
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getCatalogs

        public static java.sql.ResultSet getCatalogs()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getCatalogSeparator

        public static java.lang.String getCatalogSeparator()
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getCatalogTerm

        public static java.lang.String getCatalogTerm()
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getClientInfoProperties

        public static java.sql.ResultSet getClientInfoProperties()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getColumnPrivileges

        public static java.sql.ResultSet getColumnPrivileges​(java.lang.String catalog,
                                                             java.lang.String schema,
                                                             java.lang.String table,
                                                             java.lang.String columnNamePattern)
                                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getColumns

        public static java.sql.ResultSet getColumns​(java.lang.String catalog,
                                                    java.lang.String schemaPattern,
                                                    java.lang.String tableNamePattern,
                                                    java.lang.String columnNamePattern)
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getCrossReference

        public static java.sql.ResultSet getCrossReference​(java.lang.String parentCatalog,
                                                           java.lang.String parentSchema,
                                                           java.lang.String parentTable,
                                                           java.lang.String foreignCatalog,
                                                           java.lang.String foreignSchema,
                                                           java.lang.String foreignTable)
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDatabaseMajorVersion

        public static int getDatabaseMajorVersion()
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDatabaseMinorVersion

        public static int getDatabaseMinorVersion()
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDatabaseProductName

        public static java.lang.String getDatabaseProductName()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDatabaseProductVersion

        public static java.lang.String getDatabaseProductVersion()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDefaultTransactionIsolation

        public static int getDefaultTransactionIsolation()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDriverMajorVersion

        public static int getDriverMajorVersion()
                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDriverMinorVersion

        public static int getDriverMinorVersion()
                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDriverName

        public static java.lang.String getDriverName()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getDriverVersion

        public static java.lang.String getDriverVersion()
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getExportedKeys

        public static java.sql.ResultSet getExportedKeys​(java.lang.String catalog,
                                                         java.lang.String schema,
                                                         java.lang.String table)
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getExtraNameCharacters

        public static java.lang.String getExtraNameCharacters()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getFunctionColumns

        public static java.sql.ResultSet getFunctionColumns​(java.lang.String catalog,
                                                            java.lang.String schemaPattern,
                                                            java.lang.String functionNamePattern,
                                                            java.lang.String columnNamePattern)
                                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getFunctions

        public static java.sql.ResultSet getFunctions​(java.lang.String catalog,
                                                      java.lang.String schemaPattern,
                                                      java.lang.String functionNamePattern)
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getIdentifierQuoteString

        public static java.lang.String getIdentifierQuoteString()
                                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getImportedKeys

        public static java.sql.ResultSet getImportedKeys​(java.lang.String catalog,
                                                         java.lang.String schema,
                                                         java.lang.String table)
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getIndexInfo

        public static java.sql.ResultSet getIndexInfo​(java.lang.String catalog,
                                                      java.lang.String schema,
                                                      java.lang.String table,
                                                      boolean unique,
                                                      boolean approximate)
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getJDBCMajorVersion

        public static int getJDBCMajorVersion()
                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getJDBCMinorVersion

        public static int getJDBCMinorVersion()
                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxBinaryLiteralLength

        public static int getMaxBinaryLiteralLength()
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxCatalogNameLength

        public static int getMaxCatalogNameLength()
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxCharLiteralLength

        public static int getMaxCharLiteralLength()
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxColumnNameLength

        public static int getMaxColumnNameLength()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxColumnsInGroupBy

        public static int getMaxColumnsInGroupBy()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxColumnsInIndex

        public static int getMaxColumnsInIndex()
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxColumnsInOrderBy

        public static int getMaxColumnsInOrderBy()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxColumnsInSelect

        public static int getMaxColumnsInSelect()
                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxColumnsInTable

        public static int getMaxColumnsInTable()
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxConnections

        public static int getMaxConnections()
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxCursorNameLength

        public static int getMaxCursorNameLength()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxIndexLength

        public static int getMaxIndexLength()
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxProcedureNameLength

        public static int getMaxProcedureNameLength()
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxRowSize

        public static int getMaxRowSize()
                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxSchemaNameLength

        public static int getMaxSchemaNameLength()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxStatementLength

        public static int getMaxStatementLength()
                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxStatements

        public static int getMaxStatements()
                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxTableNameLength

        public static int getMaxTableNameLength()
                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxTablesInSelect

        public static int getMaxTablesInSelect()
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getMaxUserNameLength

        public static int getMaxUserNameLength()
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getNumericFunctions

        public static java.lang.String getNumericFunctions()
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getPrimaryKeys

        public static java.sql.ResultSet getPrimaryKeys​(java.lang.String catalog,
                                                        java.lang.String schema,
                                                        java.lang.String table)
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getProcedureColumns

        public static java.sql.ResultSet getProcedureColumns​(java.lang.String catalog,
                                                             java.lang.String schemaPattern,
                                                             java.lang.String procedureNamePattern,
                                                             java.lang.String columnNamePattern)
                                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getProcedures

        public static java.sql.ResultSet getProcedures​(java.lang.String catalog,
                                                       java.lang.String schemaPattern,
                                                       java.lang.String procedureNamePattern)
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getProcedureTerm

        public static java.lang.String getProcedureTerm()
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getResultSetHoldability

        public static int getResultSetHoldability()
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSchemas

        public static java.sql.ResultSet getSchemas​(java.lang.String catalog,
                                                    java.lang.String schemaPattern)
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSchemaTerm

        public static java.lang.String getSchemaTerm()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSearchStringEscape

        public static java.lang.String getSearchStringEscape()
                                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSQLKeywords

        public static java.lang.String getSQLKeywords()
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSQLStateType

        public static int getSQLStateType()
                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getStringFunctions

        public static java.lang.String getStringFunctions()
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSuperTables

        public static java.sql.ResultSet getSuperTables​(java.lang.String catalog,
                                                        java.lang.String schemaPattern,
                                                        java.lang.String tableNamePattern)
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSuperTypes

        public static java.sql.ResultSet getSuperTypes​(java.lang.String catalog,
                                                       java.lang.String schemaPattern,
                                                       java.lang.String typeNamePattern)
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSystemFunctions

        public static java.lang.String getSystemFunctions()
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getTablePrivileges

        public static java.sql.ResultSet getTablePrivileges​(java.lang.String catalog,
                                                            java.lang.String schemaPattern,
                                                            java.lang.String tableNamePattern)
                                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getTables

        public static java.sql.ResultSet getTables​(java.lang.String catalog,
                                                   java.lang.String schemaPattern,
                                                   java.lang.String tableNamePattern)
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getTableTypes

        public static java.sql.ResultSet getTableTypes()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getTimeDateFunctions

        public static java.lang.String getTimeDateFunctions()
                                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getTypeInfo

        public static java.sql.ResultSet getTypeInfo()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getUDTs

        public static java.sql.ResultSet getUDTs​(java.lang.String catalog,
                                                 java.lang.String schemaPattern,
                                                 java.lang.String typeNamePattern)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getURL

        public static java.lang.String getURL()
                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getUserName

        public static java.lang.String getUserName()
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getVersionColumns

        public static java.sql.ResultSet getVersionColumns​(java.lang.String catalog,
                                                           java.lang.String schema,
                                                           java.lang.String table)
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • insertsAreDetected

        public static boolean insertsAreDetected​(int type)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • isCatalogAtStart

        public static boolean isCatalogAtStart()
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • isReadOnly

        public static boolean isReadOnly()
                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • locatorsUpdateCopy

        public static boolean locatorsUpdateCopy()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • nullPlusNonNullIsNull

        public static boolean nullPlusNonNullIsNull()
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • nullsAreSortedAtEnd

        public static boolean nullsAreSortedAtEnd()
                                           throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • nullsAreSortedAtStart

        public static boolean nullsAreSortedAtStart()
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • nullsAreSortedHigh

        public static boolean nullsAreSortedHigh()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • nullsAreSortedLow

        public static boolean nullsAreSortedLow()
                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • othersDeletesAreVisible

        public static boolean othersDeletesAreVisible​(int type)
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • othersInsertsAreVisible

        public static boolean othersInsertsAreVisible​(int type)
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • othersUpdatesAreVisible

        public static boolean othersUpdatesAreVisible​(int type)
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • ownDeletesAreVisible

        public static boolean ownDeletesAreVisible​(int type)
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • ownInsertsAreVisible

        public static boolean ownInsertsAreVisible​(int type)
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • ownUpdatesAreVisible

        public static boolean ownUpdatesAreVisible​(int type)
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • storesLowerCaseIdentifiers

        public static boolean storesLowerCaseIdentifiers()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • storesLowerCaseQuotedIdentifiers

        public static boolean storesLowerCaseQuotedIdentifiers()
                                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • storesMixedCaseIdentifiers

        public static boolean storesMixedCaseIdentifiers()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • storesMixedCaseQuotedIdentifiers

        public static boolean storesMixedCaseQuotedIdentifiers()
                                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • storesUpperCaseIdentifiers

        public static boolean storesUpperCaseIdentifiers()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • storesUpperCaseQuotedIdentifiers

        public static boolean storesUpperCaseQuotedIdentifiers()
                                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsAlterTableWithAddColumn

        public static boolean supportsAlterTableWithAddColumn()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsAlterTableWithDropColumn

        public static boolean supportsAlterTableWithDropColumn()
                                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsANSI92EntryLevelSQL

        public static boolean supportsANSI92EntryLevelSQL()
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsANSI92FullSQL

        public static boolean supportsANSI92FullSQL()
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsANSI92IntermediateSQL

        public static boolean supportsANSI92IntermediateSQL()
                                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsBatchUpdates

        public static boolean supportsBatchUpdates()
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCatalogsInDataManipulation

        public static boolean supportsCatalogsInDataManipulation()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCatalogsInIndexDefinitions

        public static boolean supportsCatalogsInIndexDefinitions()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCatalogsInPrivilegeDefinitions

        public static boolean supportsCatalogsInPrivilegeDefinitions()
                                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCatalogsInProcedureCalls

        public static boolean supportsCatalogsInProcedureCalls()
                                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCatalogsInTableDefinitions

        public static boolean supportsCatalogsInTableDefinitions()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsColumnAliasing

        public static boolean supportsColumnAliasing()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsConvert

        public static boolean supportsConvert​(int fromType,
                                              int toType)
                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCoreSQLGrammar

        public static boolean supportsCoreSQLGrammar()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsCorrelatedSubqueries

        public static boolean supportsCorrelatedSubqueries()
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsDataDefinitionAndDataManipulationTransactions

        public static boolean supportsDataDefinitionAndDataManipulationTransactions()
                                                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsDataManipulationTransactionsOnly

        public static boolean supportsDataManipulationTransactionsOnly()
                                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsDifferentTableCorrelationNames

        public static boolean supportsDifferentTableCorrelationNames()
                                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsExpressionsInOrderBy

        public static boolean supportsExpressionsInOrderBy()
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsExtendedSQLGrammar

        public static boolean supportsExtendedSQLGrammar()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsFullOuterJoins

        public static boolean supportsFullOuterJoins()
                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsGetGeneratedKeys

        public static boolean supportsGetGeneratedKeys()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsGroupBy

        public static boolean supportsGroupBy()
                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsGroupByBeyondSelect

        public static boolean supportsGroupByBeyondSelect()
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsGroupByUnrelated

        public static boolean supportsGroupByUnrelated()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsIntegrityEnhancementFacility

        public static boolean supportsIntegrityEnhancementFacility()
                                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsLikeEscapeClause

        public static boolean supportsLikeEscapeClause()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsLimitedOuterJoins

        public static boolean supportsLimitedOuterJoins()
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsMinimumSQLGrammar

        public static boolean supportsMinimumSQLGrammar()
                                                 throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsMixedCaseIdentifiers

        public static boolean supportsMixedCaseIdentifiers()
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsMixedCaseQuotedIdentifiers

        public static boolean supportsMixedCaseQuotedIdentifiers()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsMultipleOpenResults

        public static boolean supportsMultipleOpenResults()
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsMultipleResultSets

        public static boolean supportsMultipleResultSets()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsMultipleTransactions

        public static boolean supportsMultipleTransactions()
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsNamedParameters

        public static boolean supportsNamedParameters()
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsNonNullableColumns

        public static boolean supportsNonNullableColumns()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsOpenCursorsAcrossCommit

        public static boolean supportsOpenCursorsAcrossCommit()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsOpenCursorsAcrossRollback

        public static boolean supportsOpenCursorsAcrossRollback()
                                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsOpenStatementsAcrossCommit

        public static boolean supportsOpenStatementsAcrossCommit()
                                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsOpenStatementsAcrossRollback

        public static boolean supportsOpenStatementsAcrossRollback()
                                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsOrderByUnrelated

        public static boolean supportsOrderByUnrelated()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsOuterJoins

        public static boolean supportsOuterJoins()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsPositionedDelete

        public static boolean supportsPositionedDelete()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsPositionedUpdate

        public static boolean supportsPositionedUpdate()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsResultSetConcurrency

        public static boolean supportsResultSetConcurrency​(int type,
                                                           int concurrency)
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsResultSetHoldability

        public static boolean supportsResultSetHoldability​(int holdability)
                                                    throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsResultSetType

        public static boolean supportsResultSetType​(int type)
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSavepoints

        public static boolean supportsSavepoints()
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSchemasInDataManipulation

        public static boolean supportsSchemasInDataManipulation()
                                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSchemasInIndexDefinitions

        public static boolean supportsSchemasInIndexDefinitions()
                                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSchemasInPrivilegeDefinitions

        public static boolean supportsSchemasInPrivilegeDefinitions()
                                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSchemasInProcedureCalls

        public static boolean supportsSchemasInProcedureCalls()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSchemasInTableDefinitions

        public static boolean supportsSchemasInTableDefinitions()
                                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSelectForUpdate

        public static boolean supportsSelectForUpdate()
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsStatementPooling

        public static boolean supportsStatementPooling()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsStoredFunctionsUsingCallSyntax

        public static boolean supportsStoredFunctionsUsingCallSyntax()
                                                              throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsStoredProcedures

        public static boolean supportsStoredProcedures()
                                                throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSubqueriesInComparisons

        public static boolean supportsSubqueriesInComparisons()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSubqueriesInExists

        public static boolean supportsSubqueriesInExists()
                                                  throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSubqueriesInIns

        public static boolean supportsSubqueriesInIns()
                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsSubqueriesInQuantifieds

        public static boolean supportsSubqueriesInQuantifieds()
                                                       throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsTableCorrelationNames

        public static boolean supportsTableCorrelationNames()
                                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsTransactionIsolationLevel

        public static boolean supportsTransactionIsolationLevel​(int level)
                                                         throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsTransactions

        public static boolean supportsTransactions()
                                            throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsUnion

        public static boolean supportsUnion()
                                     throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • supportsUnionAll

        public static boolean supportsUnionAll()
                                        throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • updatesAreDetected

        public static boolean updatesAreDetected​(int type)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • usesLocalFilePerTable

        public static boolean usesLocalFilePerTable()
                                             throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • usesLocalFiles

        public static boolean usesLocalFiles()
                                      throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • isSet

        private boolean isSet​(int allModifiers,
                              int requestedModifier)

        Return true if the requested modifer is set

      • unregisterFunction

        private void unregisterFunction​(java.sql.Connection conn,
                                        java.lang.reflect.Method method)
                                 throws java.sql.SQLException

        Drop the function with this method name.

        Throws:
        java.sql.SQLException
      • registerFunction

        private void registerFunction​(java.sql.Connection conn,
                                      java.lang.reflect.Method method)
                               throws java.sql.SQLException

        Register the method as a Derby function.

        Throws:
        java.sql.SQLException
      • isTableFunction

        private boolean isTableFunction​(java.lang.reflect.Method method)

        Return true if the method describes a table function.

      • appendArgs

        private void appendArgs​(java.lang.StringBuffer buffer,
                                java.lang.reflect.Method method)
                         throws java.sql.SQLException

        Append function arguments to an evolving ddl text buffer.

        Throws:
        java.sql.SQLException
      • appendReturnType

        private void appendReturnType​(java.lang.StringBuffer buffer,
                                      java.sql.Connection conn,
                                      java.lang.reflect.Method method)
                               throws java.sql.SQLException

        Append return type to an evolving ddl text buffer

        Throws:
        java.sql.SQLException
      • appendTableFunctionSignature

        private void appendTableFunctionSignature​(java.lang.StringBuffer buffer,
                                                  java.sql.Connection conn,
                                                  java.lang.reflect.Method method)
                                           throws java.sql.SQLException

        Append the signature of a table function to an evolving ddl text buffer

        Throws:
        java.sql.SQLException
      • getDummyValue

        private java.lang.Object getDummyValue​(java.lang.Class type)

        Get a dummy value for an argument to a DBMD method.

      • stringifyJDBCType

        private void stringifyJDBCType​(java.lang.StringBuffer buffer,
                                       java.sql.ResultSetMetaData rsmd,
                                       int columnNumber)
                                throws java.sql.SQLException

        Append the name of a SQL type to an evolving ddl text buffer

        Throws:
        java.sql.SQLException
      • mapJavaToSQLType

        private java.lang.String mapJavaToSQLType​(java.lang.Class javaType)
                                           throws java.sql.SQLException

        Get the SQL type which corresponds to a Java type.

        Throws:
        java.sql.SQLException
      • getDBMD

        private static java.sql.DatabaseMetaData getDBMD()
                                                  throws java.sql.SQLException

        Get the current session's database metadata.

        Throws:
        java.sql.SQLException
      • getDefaultConnection

        private static java.sql.Connection getDefaultConnection()
                                                         throws java.sql.SQLException

        Get the default connection, called from inside the database engine.

        Throws:
        java.sql.SQLException
      • executeDDL

        private static void executeDDL​(java.sql.Connection conn,
                                       java.lang.String text)
                                throws java.sql.SQLException

        Execute a DDL statement.

        Throws:
        java.sql.SQLException
      • prepareStatement

        private static java.sql.PreparedStatement prepareStatement​(java.sql.Connection conn,
                                                                   java.lang.String text)
                                                            throws java.sql.SQLException

        Prepare a statement and print out the text.

        Throws:
        java.sql.SQLException
      • wrap

        private static java.sql.SQLException wrap​(java.lang.Throwable t)

        Wrap an exception in a SQLException.