org.apache.derby.impl.tools.optional
Class DBMDWrapper

java.lang.Object
  extended by org.apache.derby.impl.tools.optional.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:

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( '', '' );
 


Field Summary
private static int DEFAULT_PRECISION
           
 
Constructor Summary
DBMDWrapper()
          0-arg constructor to satisfy the OptionalTool contract
 
Method Summary
static boolean allProceduresAreCallable()
           
static boolean allTablesAreSelectable()
           
private  void appendArgs(java.lang.StringBuffer buffer, java.lang.reflect.Method method)
          Append function arguments to an evolving ddl text buffer.
private  void appendReturnType(java.lang.StringBuffer buffer, java.sql.Connection conn, java.lang.reflect.Method method)
          Append return type to an evolving ddl text buffer
private  void appendTableFunctionSignature(java.lang.StringBuffer buffer, java.sql.Connection conn, java.lang.reflect.Method method)
          Append the signature of a table function to an evolving ddl text buffer
static boolean autoCommitFailureClosesAllResultSets()
           
static boolean dataDefinitionCausesTransactionCommit()
           
static boolean dataDefinitionIgnoredInTransactions()
           
static boolean deletesAreDetected(int type)
           
static boolean doesMaxRowSizeIncludeBlobs()
           
private static void executeDDL(java.sql.Connection conn, java.lang.String text)
          Execute a DDL statement.
static java.sql.ResultSet getAttributes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern, java.lang.String attributeNamePattern)
           
static java.sql.ResultSet getBestRowIdentifier(java.lang.String catalog, java.lang.String schema, java.lang.String table, int scope, boolean nullable)
           
static java.sql.ResultSet getCatalogs()
           
static java.lang.String getCatalogSeparator()
           
static java.lang.String getCatalogTerm()
           
static java.sql.ResultSet getClientInfoProperties()
           
static java.sql.ResultSet getColumnPrivileges(java.lang.String catalog, java.lang.String schema, java.lang.String table, java.lang.String columnNamePattern)
           
static java.sql.ResultSet getColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern, java.lang.String columnNamePattern)
           
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)
           
static int getDatabaseMajorVersion()
           
static int getDatabaseMinorVersion()
           
static java.lang.String getDatabaseProductName()
           
static java.lang.String getDatabaseProductVersion()
           
private static java.sql.DatabaseMetaData getDBMD()
           Get the current session's database metadata.
private static java.sql.Connection getDefaultConnection()
           Get the default connection, called from inside the database engine.
static int getDefaultTransactionIsolation()
           
static int getDriverMajorVersion()
           
static int getDriverMinorVersion()
           
static java.lang.String getDriverName()
           
static java.lang.String getDriverVersion()
           
private  java.lang.Object getDummyValue(java.lang.Class type)
          Get a dummy value for an argument to a DBMD method.
static java.sql.ResultSet getExportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
           
static java.lang.String getExtraNameCharacters()
           
static java.sql.ResultSet getFunctionColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern, java.lang.String columnNamePattern)
           
static java.sql.ResultSet getFunctions(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String functionNamePattern)
           
static java.lang.String getIdentifierQuoteString()
           
static java.sql.ResultSet getImportedKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
           
static java.sql.ResultSet getIndexInfo(java.lang.String catalog, java.lang.String schema, java.lang.String table, boolean unique, boolean approximate)
           
static int getJDBCMajorVersion()
           
static int getJDBCMinorVersion()
           
static int getMaxBinaryLiteralLength()
           
static int getMaxCatalogNameLength()
           
static int getMaxCharLiteralLength()
           
static int getMaxColumnNameLength()
           
static int getMaxColumnsInGroupBy()
           
static int getMaxColumnsInIndex()
           
static int getMaxColumnsInOrderBy()
           
static int getMaxColumnsInSelect()
           
static int getMaxColumnsInTable()
           
static int getMaxConnections()
           
static int getMaxCursorNameLength()
           
static int getMaxIndexLength()
           
static int getMaxProcedureNameLength()
           
static int getMaxRowSize()
           
static int getMaxSchemaNameLength()
           
static int getMaxStatementLength()
           
static int getMaxStatements()
           
static int getMaxTableNameLength()
           
static int getMaxTablesInSelect()
           
static int getMaxUserNameLength()
           
static java.lang.String getNumericFunctions()
           
static java.sql.ResultSet getPrimaryKeys(java.lang.String catalog, java.lang.String schema, java.lang.String table)
           
static java.sql.ResultSet getProcedureColumns(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern, java.lang.String columnNamePattern)
           
static java.sql.ResultSet getProcedures(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String procedureNamePattern)
           
static java.lang.String getProcedureTerm()
           
static int getResultSetHoldability()
           
static java.sql.ResultSet getSchemas(java.lang.String catalog, java.lang.String schemaPattern)
           
static java.lang.String getSchemaTerm()
           
static java.lang.String getSearchStringEscape()
           
static java.lang.String getSQLKeywords()
           
static int getSQLStateType()
           
static java.lang.String getStringFunctions()
           
static java.sql.ResultSet getSuperTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
           
static java.sql.ResultSet getSuperTypes(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern)
           
static java.lang.String getSystemFunctions()
           
static java.sql.ResultSet getTablePrivileges(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
           
static java.sql.ResultSet getTables(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String tableNamePattern)
           
static java.sql.ResultSet getTableTypes()
           
static java.lang.String getTimeDateFunctions()
           
static java.sql.ResultSet getTypeInfo()
           
static java.sql.ResultSet getUDTs(java.lang.String catalog, java.lang.String schemaPattern, java.lang.String typeNamePattern)
           
static java.lang.String getURL()
           
static java.lang.String getUserName()
           
static java.sql.ResultSet getVersionColumns(java.lang.String catalog, java.lang.String schema, java.lang.String table)
           
static boolean insertsAreDetected(int type)
           
static boolean isCatalogAtStart()
           
static boolean isReadOnly()
           
private  boolean isSet(int allModifiers, int requestedModifier)
          Return true if the requested modifer is set
private  boolean isTableFunction(java.lang.reflect.Method method)
          Return true if the method describes a table function.
 void loadTool(java.lang.String... configurationParameters)
          Load the tool, giving it optional configuration parameters
static boolean locatorsUpdateCopy()
           
private  java.lang.String mapJavaToSQLType(java.lang.Class javaType)
          Get the SQL type which corresponds to a Java type.
static boolean nullPlusNonNullIsNull()
           
static boolean nullsAreSortedAtEnd()
           
static boolean nullsAreSortedAtStart()
           
static boolean nullsAreSortedHigh()
           
static boolean nullsAreSortedLow()
           
static boolean othersDeletesAreVisible(int type)
           
static boolean othersInsertsAreVisible(int type)
           
static boolean othersUpdatesAreVisible(int type)
           
static boolean ownDeletesAreVisible(int type)
           
static boolean ownInsertsAreVisible(int type)
           
static boolean ownUpdatesAreVisible(int type)
           
private static java.sql.PreparedStatement prepareStatement(java.sql.Connection conn, java.lang.String text)
           Prepare a statement and print out the text.
private  void register(boolean register)
           Workhorse to register or unregister all public static methods as Derby routines.
private  void registerFunction(java.sql.Connection conn, java.lang.reflect.Method method)
          Register the method as a Derby function.
static boolean storesLowerCaseIdentifiers()
           
static boolean storesLowerCaseQuotedIdentifiers()
           
static boolean storesMixedCaseIdentifiers()
           
static boolean storesMixedCaseQuotedIdentifiers()
           
static boolean storesUpperCaseIdentifiers()
           
static boolean storesUpperCaseQuotedIdentifiers()
           
private  void stringifyJDBCType(java.lang.StringBuffer buffer, java.sql.ResultSetMetaData rsmd, int columnNumber)
          Append the name of a SQL type to an evolving ddl text buffer
static boolean supportsAlterTableWithAddColumn()
           
static boolean supportsAlterTableWithDropColumn()
           
static boolean supportsANSI92EntryLevelSQL()
           
static boolean supportsANSI92FullSQL()
           
static boolean supportsANSI92IntermediateSQL()
           
static boolean supportsBatchUpdates()
           
static boolean supportsCatalogsInDataManipulation()
           
static boolean supportsCatalogsInIndexDefinitions()
           
static boolean supportsCatalogsInPrivilegeDefinitions()
           
static boolean supportsCatalogsInProcedureCalls()
           
static boolean supportsCatalogsInTableDefinitions()
           
static boolean supportsColumnAliasing()
           
static boolean supportsConvert(int fromType, int toType)
           
static boolean supportsCoreSQLGrammar()
           
static boolean supportsCorrelatedSubqueries()
           
static boolean supportsDataDefinitionAndDataManipulationTransactions()
           
static boolean supportsDataManipulationTransactionsOnly()
           
static boolean supportsDifferentTableCorrelationNames()
           
static boolean supportsExpressionsInOrderBy()
           
static boolean supportsExtendedSQLGrammar()
           
static boolean supportsFullOuterJoins()
           
static boolean supportsGetGeneratedKeys()
           
static boolean supportsGroupBy()
           
static boolean supportsGroupByBeyondSelect()
           
static boolean supportsGroupByUnrelated()
           
static boolean supportsIntegrityEnhancementFacility()
           
static boolean supportsLikeEscapeClause()
           
static boolean supportsLimitedOuterJoins()
           
static boolean supportsMinimumSQLGrammar()
           
static boolean supportsMixedCaseIdentifiers()
           
static boolean supportsMixedCaseQuotedIdentifiers()
           
static boolean supportsMultipleOpenResults()
           
static boolean supportsMultipleResultSets()
           
static boolean supportsMultipleTransactions()
           
static boolean supportsNamedParameters()
           
static boolean supportsNonNullableColumns()
           
static boolean supportsOpenCursorsAcrossCommit()
           
static boolean supportsOpenCursorsAcrossRollback()
           
static boolean supportsOpenStatementsAcrossCommit()
           
static boolean supportsOpenStatementsAcrossRollback()
           
static boolean supportsOrderByUnrelated()
           
static boolean supportsOuterJoins()
           
static boolean supportsPositionedDelete()
           
static boolean supportsPositionedUpdate()
           
static boolean supportsResultSetConcurrency(int type, int concurrency)
           
static boolean supportsResultSetHoldability(int holdability)
           
static boolean supportsResultSetType(int type)
           
static boolean supportsSavepoints()
           
static boolean supportsSchemasInDataManipulation()
           
static boolean supportsSchemasInIndexDefinitions()
           
static boolean supportsSchemasInPrivilegeDefinitions()
           
static boolean supportsSchemasInProcedureCalls()
           
static boolean supportsSchemasInTableDefinitions()
           
static boolean supportsSelectForUpdate()
           
static boolean supportsStatementPooling()
           
static boolean supportsStoredFunctionsUsingCallSyntax()
           
static boolean supportsStoredProcedures()
           
static boolean supportsSubqueriesInComparisons()
           
static boolean supportsSubqueriesInExists()
           
static boolean supportsSubqueriesInIns()
           
static boolean supportsSubqueriesInQuantifieds()
           
static boolean supportsTableCorrelationNames()
           
static boolean supportsTransactionIsolationLevel(int level)
           
static boolean supportsTransactions()
           
static boolean supportsUnion()
           
static boolean supportsUnionAll()
           
 void unloadTool(java.lang.String... configurationParameters)
          Unload the tool, giving it optional configuration parameters
private  void unregisterFunction(java.sql.Connection conn, java.lang.reflect.Method method)
          Drop the function with this method name.
static boolean updatesAreDetected(int type)
           
static boolean usesLocalFilePerTable()
           
static boolean usesLocalFiles()
           
private static java.sql.SQLException wrap(java.lang.Throwable t)
           Wrap an exception in a SQLException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PRECISION

private static final int DEFAULT_PRECISION
See Also:
Constant Field Values
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.


Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.