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( '', '' );
| Modifier and Type | Field and Description |
|---|---|
private static int |
DEFAULT_PRECISION |
| Constructor and Description |
|---|
DBMDWrapper()
0-arg constructor to satisfy the OptionalTool contract
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
private static final int DEFAULT_PRECISION
public DBMDWrapper()
public void loadTool(java.lang.String... configurationParameters)
throws java.sql.SQLException
OptionalToolloadTool in interface OptionalTooljava.sql.SQLExceptionpublic void unloadTool(java.lang.String... configurationParameters)
throws java.sql.SQLException
OptionalToolunloadTool in interface OptionalTooljava.sql.SQLExceptionprivate void register(boolean register)
throws java.sql.SQLException
Workhorse to register or unregister all public static methods as Derby routines.
java.sql.SQLExceptionpublic static boolean allProceduresAreCallable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean allTablesAreSelectable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean autoCommitFailureClosesAllResultSets()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean dataDefinitionCausesTransactionCommit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean dataDefinitionIgnoredInTransactions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean deletesAreDetected(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean doesMaxRowSizeIncludeBlobs()
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic static java.sql.ResultSet getCatalogs()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getCatalogSeparator()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getCatalogTerm()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getClientInfoProperties()
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic static int getDatabaseMajorVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getDatabaseMinorVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getDatabaseProductName()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getDatabaseProductVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getDefaultTransactionIsolation()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getDriverMajorVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getDriverMinorVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getDriverName()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getDriverVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getExportedKeys(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getExtraNameCharacters()
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic static java.sql.ResultSet getFunctions(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String functionNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getIdentifierQuoteString()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getImportedKeys(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic static int getJDBCMajorVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getJDBCMinorVersion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxBinaryLiteralLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxCatalogNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxCharLiteralLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxColumnNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxColumnsInGroupBy()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxColumnsInIndex()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxColumnsInOrderBy()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxColumnsInSelect()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxColumnsInTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxConnections()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxCursorNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxIndexLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxProcedureNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxRowSize()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxSchemaNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxStatementLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxStatements()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxTableNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxTablesInSelect()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getMaxUserNameLength()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getNumericFunctions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getPrimaryKeys(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
java.sql.SQLExceptionpublic 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
java.sql.SQLExceptionpublic static java.sql.ResultSet getProcedures(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String procedureNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getProcedureTerm()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getResultSetHoldability()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getSchemas(java.lang.String catalog,
java.lang.String schemaPattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getSchemaTerm()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getSearchStringEscape()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getSQLKeywords()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static int getSQLStateType()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getStringFunctions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getSuperTables(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getSuperTypes(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String typeNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getSystemFunctions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getTablePrivileges(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getTables(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getTableTypes()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getTimeDateFunctions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getTypeInfo()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getUDTs(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String typeNamePattern)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getURL()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.lang.String getUserName()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.sql.ResultSet getVersionColumns(java.lang.String catalog,
java.lang.String schema,
java.lang.String table)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean insertsAreDetected(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean isCatalogAtStart()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean isReadOnly()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean locatorsUpdateCopy()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean nullPlusNonNullIsNull()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean nullsAreSortedAtEnd()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean nullsAreSortedAtStart()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean nullsAreSortedHigh()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean nullsAreSortedLow()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean othersDeletesAreVisible(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean othersInsertsAreVisible(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean othersUpdatesAreVisible(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean ownDeletesAreVisible(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean ownInsertsAreVisible(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean ownUpdatesAreVisible(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean storesLowerCaseIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean storesLowerCaseQuotedIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean storesMixedCaseIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean storesMixedCaseQuotedIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean storesUpperCaseIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean storesUpperCaseQuotedIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsAlterTableWithAddColumn()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsAlterTableWithDropColumn()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsANSI92EntryLevelSQL()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsANSI92FullSQL()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsANSI92IntermediateSQL()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsBatchUpdates()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCatalogsInDataManipulation()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCatalogsInIndexDefinitions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCatalogsInPrivilegeDefinitions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCatalogsInProcedureCalls()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCatalogsInTableDefinitions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsColumnAliasing()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsConvert(int fromType,
int toType)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCoreSQLGrammar()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsCorrelatedSubqueries()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsDataDefinitionAndDataManipulationTransactions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsDataManipulationTransactionsOnly()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsDifferentTableCorrelationNames()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsExpressionsInOrderBy()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsExtendedSQLGrammar()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsFullOuterJoins()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsGetGeneratedKeys()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsGroupBy()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsGroupByBeyondSelect()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsGroupByUnrelated()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsIntegrityEnhancementFacility()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsLikeEscapeClause()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsLimitedOuterJoins()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsMinimumSQLGrammar()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsMixedCaseIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsMixedCaseQuotedIdentifiers()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsMultipleOpenResults()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsMultipleResultSets()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsMultipleTransactions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsNamedParameters()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsNonNullableColumns()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsOpenCursorsAcrossCommit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsOpenCursorsAcrossRollback()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsOpenStatementsAcrossCommit()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsOpenStatementsAcrossRollback()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsOrderByUnrelated()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsOuterJoins()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsPositionedDelete()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsPositionedUpdate()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsResultSetConcurrency(int type,
int concurrency)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsResultSetHoldability(int holdability)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsResultSetType(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSavepoints()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSchemasInDataManipulation()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSchemasInIndexDefinitions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSchemasInPrivilegeDefinitions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSchemasInProcedureCalls()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSchemasInTableDefinitions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSelectForUpdate()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsStatementPooling()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsStoredFunctionsUsingCallSyntax()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsStoredProcedures()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSubqueriesInComparisons()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSubqueriesInExists()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSubqueriesInIns()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsSubqueriesInQuantifieds()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsTableCorrelationNames()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsTransactionIsolationLevel(int level)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsTransactions()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsUnion()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean supportsUnionAll()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean updatesAreDetected(int type)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean usesLocalFilePerTable()
throws java.sql.SQLException
java.sql.SQLExceptionpublic static boolean usesLocalFiles()
throws java.sql.SQLException
java.sql.SQLExceptionprivate boolean isSet(int allModifiers,
int requestedModifier)
Return true if the requested modifer is set
private void unregisterFunction(java.sql.Connection conn,
java.lang.reflect.Method method)
throws java.sql.SQLException
Drop the function with this method name.
java.sql.SQLExceptionprivate void registerFunction(java.sql.Connection conn,
java.lang.reflect.Method method)
throws java.sql.SQLException
Register the method as a Derby function.
java.sql.SQLExceptionprivate boolean isTableFunction(java.lang.reflect.Method method)
Return true if the method describes a table function.
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.
java.sql.SQLExceptionprivate 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
java.sql.SQLExceptionprivate 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
java.sql.SQLExceptionprivate java.lang.Object getDummyValue(java.lang.Class type)
Get a dummy value for an argument to a DBMD method.
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
java.sql.SQLExceptionprivate java.lang.String mapJavaToSQLType(java.lang.Class javaType)
throws java.sql.SQLException
Get the SQL type which corresponds to a Java type.
java.sql.SQLExceptionprivate static java.sql.DatabaseMetaData getDBMD()
throws java.sql.SQLException
Get the current session's database metadata.
java.sql.SQLExceptionprivate static java.sql.Connection getDefaultConnection()
throws java.sql.SQLException
Get the default connection, called from inside the database engine.
java.sql.SQLExceptionprivate static void executeDDL(java.sql.Connection conn,
java.lang.String text)
throws java.sql.SQLException
Execute a DDL statement.
java.sql.SQLExceptionprivate 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.
java.sql.SQLExceptionprivate static java.sql.SQLException wrap(java.lang.Throwable t)
Wrap an exception in a SQLException.
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.