|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--superwaba.ext.xplat.sql.DatabaseMetaData
|
+--superwaba.ext.xplat.sql.db2e.wdbc.Db2eMetaData
With this class you can get some information regarding a database
| Method Summary | |
boolean |
doesMaxRowSizeIncludeBlobs()
This method tests whether or not the maximum row size includes BLOB's |
ResultSet |
getCatalogs()
This method returns the list of database catalogs as a ResultSet with one column - TABLE_CAT - that is the
name of the catalog. |
ResultSet |
getColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
This method returns a list of the tables columns for the requested tables. |
Connection |
getConnection()
This method returns the Connection object that was used
to generate the metadata in this object. |
ResultSet |
getCrossReference(String primaryCatalog,
String primarySchema,
String primaryTable,
String foreignCatalog,
String foreignSchema,
String foreignTable)
This method returns a description of how one table imports another table's primary key as a foreign key. |
int |
getDatabaseMajorVersion()
|
int |
getDatabaseMinorVersion()
|
String |
getDatabaseProductName()
This method returns the name of the database product. |
String |
getDatabaseProductVersion()
This method returns the version of the database product. |
int |
getDefaultTransactionIsolation()
This method returns the default transaction isolation level of the database. |
int |
getDriverMajorVersion()
This method returns the major version number of the JDBC driver. |
int |
getDriverMinorVersion()
This method returns the minor version number of the JDBC driver. |
String |
getDriverName()
This method returns the name of the JDBC driver. |
String |
getDriverVersion()
This method returns the version of the JDBC driver. |
ResultSet |
getExportedKeys(String catalog,
String schema,
String table)
This method returns a list of the table's which use this table's primary key as a foreign key. |
String |
getIdentifierQuoteString()
This metohd returns the quote string for SQL identifiers. |
ResultSet |
getImportedKeys(String catalog,
String schema,
String table)
This method returns a list of the table's foreign keys. |
ResultSet |
getIndexInfo(String catalog,
String schema,
String table,
boolean unique,
boolean approximate)
This method returns information about a tables indices and statistics. |
int |
getJDBCMajorVersion()
|
int |
getJDBCMinorVersion()
|
int |
getMaxBinaryLiteralLength()
This method returns the number of hex characters allowed in an inline binary literal. |
int |
getMaxCatalogNameLength()
This method returns the maximum length of a catalog name. |
int |
getMaxCharLiteralLength()
This method returns the maximum length of a character literal. |
int |
getMaxColumnNameLength()
This method returns the maximum length of a column name. |
int |
getMaxColumnsInGroupBy()
This method returns the maximum number of columns in a GROUP BY statement. |
int |
getMaxColumnsInIndex()
This method returns the maximum number of columns in an index. |
int |
getMaxColumnsInOrderBy()
This method returns the maximum number of columns in an ORDER BY statement. |
int |
getMaxColumnsInSelect()
This method returns the maximum number of columns in a SELECT statement. |
int |
getMaxColumnsInTable()
This method returns the maximum number of columns in a table. |
int |
getMaxConnections()
This method returns the maximum number of connections this client can have to the database. |
int |
getMaxCursorNameLength()
This method returns the maximum length of a cursor name. |
int |
getMaxIndexLength()
This method returns the maximum length of an index. |
int |
getMaxProcedureNameLength()
This method returns the maximum length of a procedure name. |
int |
getMaxRowSize()
This method returns the maximum size of a row in bytes. |
int |
getMaxSchemaNameLength()
This method returns the maximum length of a schema name. |
int |
getMaxStatementLength()
This method includes the maximum length of a SQL statement. |
int |
getMaxStatements()
This method returns the maximum number of statements that can be active at any time. |
int |
getMaxTableNameLength()
This method returns the maximum length of a table name. |
int |
getMaxTablesInSelect()
This method returns the maximum number of tables that may be referenced in a SELECT statement. |
int |
getMaxUserNameLength()
This method returns the maximum length of a user name. |
ResultSet |
getPrimaryKeys(String catalog,
String schema,
String table)
This method returns a list of a table's primary key columns. |
ResultSet |
getSchemas()
This method returns the list of database schemas as a ResultSet, with one column - TABLE_SCHEM - that is the
name of the schema. |
String |
getSearchStringEscape()
This method returns the string used to escape wildcards in search strings. |
int |
getSQLStateType()
|
ResultSet |
getTables(String catalog,
String schemaPattern,
String tableNamePattern,
String[] types)
This method returns a list of the requested table as a ResultSet with the following columns:
TABLE_CAT - The catalog the table is in, which may be null.
|
String |
getURL()
This method returns the URL for this database. |
String |
getUserName()
This method returns the database username for this connection. |
boolean |
supportsBatchUpdates()
This method tests whether or not the database supports batch updates. |
boolean |
supportsMultipleOpenResults()
|
boolean |
supportsMultipleResultSets()
This method tests whether multiple result sets for a single statement are supported. |
boolean |
supportsMultipleTransactions()
This method test whether or not multiple transactions may be open at once, as long as they are on different connections. |
boolean |
supportsNamedParameters()
|
boolean |
supportsNonNullableColumns()
This method tests whether or not columns can be defined as NOT NULL. |
boolean |
supportsOpenCursorsAcrossCommit()
This method tests whether or not the database supports cursors remaining open across commits. |
boolean |
supportsOpenCursorsAcrossRollback()
This method tests whether or not the database supports cursors remaining open across rollbacks. |
boolean |
supportsOpenStatementsAcrossCommit()
This method tests whether or not the database supports statements remaining open across commits. |
boolean |
supportsOpenStatementsAcrossRollback()
This method tests whether or not the database supports statements remaining open across rollbacks. |
boolean |
supportsResultSetConcurrency(int type,
int concurrency)
This method tests whether the specified result set type and result set concurrency type are supported by the database. |
boolean |
supportsResultSetType(int type)
This method tests whether or not the datbase supports the specified result type. |
boolean |
supportsTransactionIsolationLevel(int level)
This method tests whether or not the database supports the specified transaction isolation level. |
boolean |
supportsTransactions()
This method tests whether or not the database supports transactions. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
| Method Detail |
public ResultSet getCatalogs()
throws SQLException
ResultSet with one column - TABLE_CAT - that is the
name of the catalog.ResultSet with all the requested catalogs.
public ResultSet getColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
throws SQLException
ResultSet with the following columns:
null.
null.
Types.
tableNoNulls,
tableNullable, or tableNullableUnknown)
null.
catalog - The name of the catalog to return table from,
or "" to return tables from all catalogs.schemaPattern - A schema pattern for the schemas to return
tables from, or "" to return tables from all schemas.namePattern - The pattern of tables names to return.columnPattern - The pattern of column names to return.
public Connection getConnection()
throws SQLException
Connection object that was used
to generate the metadata in this object.
public ResultSet getCrossReference(String primaryCatalog,
String primarySchema,
String primaryTable,
String foreignCatalog,
String foreignSchema,
String foreignTable)
throws SQLException
ResultSet with the following columns:
importedNoAction, importedKeyCascade,
importedKeySetNull, importedKeySetDefault, or
importedKeyRestrict).
importedNoAction, importedKeyCascade,
importedKeySetNull, or importedKeySetDefault)
importedKeyInitiallyDeferred,
importedKeyInitiallyImmediate, or
importedKeyNotDeferrable).
primCatalog - The catalog to retrieve information from, or the empty string
to return entities not associated with a catalog, or null
to return information from all catalogs, on the exporting side.primSchema - The schema to retrieve information from, or the empty string
to return entities not associated with a schema, on the exporting side.primTable - The table name to return information for, on the exporting
side.forCatalog - The catalog to retrieve information from, or the empty string
to return entities not associated with a catalog, or null
to return information from all catalogs, on the importing side.forSchema - The schema to retrieve information from, or the empty string
to return entities not associated with a schema on the importing side.forTable - The table name to return information for on the importing
side.ResultSet with the requested information
public int getDatabaseMajorVersion()
throws SQLException
public int getDatabaseMinorVersion()
throws SQLException
public String getDatabaseProductName()
throws SQLException
public String getDatabaseProductVersion()
throws SQLException
public int getDefaultTransactionIsolation()
throws SQLException
Connectionpublic int getDriverMajorVersion()
public int getDriverMinorVersion()
public String getDriverName()
throws SQLException
public String getDriverVersion()
throws SQLException
public ResultSet getExportedKeys(String catalog,
String schema,
String table)
throws SQLException
ResultSet with the following columns:
importedNoAction, importedKeyCascade,
importedKeySetNull, importedKeySetDefault, or
importedKeyRestrict).
importedNoAction, importedKeyCascade,
importedKeySetNull, or importedKeySetDefault)
importedKeyInitiallyDeferred,
importedKeyInitiallyImmediate, or
importedKeyNotDeferrable).
catalog - The catalog to retrieve information from, or the empty string
to return entities not associated with a catalog, or null
to return information from all catalogs.schema - The schema to retrieve information from, or the empty string
to return entities not associated with a schema.table - The table name to return information for.ResultSet with the requested information
public String getIdentifierQuoteString()
throws SQLException
public ResultSet getImportedKeys(String catalog,
String schema,
String table)
throws SQLException
ResultSet with the following columns:
importedNoAction, importedKeyCascade,
importedKeySetNull, importedKeySetDefault, or
importedKeyRestrict).
importedNoAction, importedKeyCascade,
importedKeySetNull, or importedKeySetDefault)
importedKeyInitiallyDeferred,
importedKeyInitiallyImmediate, or
importedKeyNotDeferrable).
catalog - The catalog to retrieve information from, or the empty string
to return entities not associated with a catalog, or null
to return information from all catalogs.schema - The schema to retrieve information from, or the empty string
to return entities not associated with a schema.table - The table name to return information for.ResultSet with the foreign key columns.
public ResultSet getIndexInfo(String catalog,
String schema,
String table,
boolean unique,
boolean approximate)
throws SQLException
ResultSet with the following columns:
null.
null.
null
tableIndexStatistic,
tableIndexClustered, tableIndexHashed, or
tableIndexOther).
tableIndexStatistic.
null if a sort sequence is not
supported.
tableIndexStatistic.
tableIndexStatistic.
null.
catalog - The catalog to retrieve information from, or the empty string
to return entities not associated with a catalog, or
null to return information from all catalogs.schema - The schema to retrieve information from, or the empty string
to return entities not associated with a schema.table - The table name to return information for.unique - true to return only unique indexes,
false otherwise.approx - true if data values can be approximations,
false otherwise.ResultSet with the requested index information
public int getJDBCMajorVersion()
throws SQLException
public int getJDBCMinorVersion()
throws SQLException
public int getMaxBinaryLiteralLength()
throws SQLException
public int getMaxCatalogNameLength()
throws SQLException
public int getMaxCharLiteralLength()
throws SQLException
public int getMaxColumnNameLength()
throws SQLException
public int getMaxColumnsInGroupBy()
throws SQLException
public int getMaxColumnsInIndex()
throws SQLException
public int getMaxColumnsInOrderBy()
throws SQLException
public int getMaxColumnsInSelect()
throws SQLException
public int getMaxColumnsInTable()
throws SQLException
public int getMaxConnections()
throws SQLException
public int getMaxCursorNameLength()
throws SQLException
public int getMaxIndexLength()
throws SQLException
public int getMaxProcedureNameLength()
throws SQLException
public int getMaxRowSize()
throws SQLException
public int getMaxSchemaNameLength()
throws SQLException
public int getMaxStatementLength()
throws SQLException
public int getMaxStatements()
throws SQLException
public int getMaxTableNameLength()
throws SQLException
public int getMaxTablesInSelect()
throws SQLException
public int getMaxUserNameLength()
throws SQLException
public boolean doesMaxRowSizeIncludeBlobs()
throws SQLException
true if the maximum row size includes BLOB's,
false otherwise.
public ResultSet getPrimaryKeys(String catalog,
String schema,
String table)
throws SQLException
ResultSet with the following columns.
null.
null.
null.
catalog - The catalog to retrieve information from, or the empty string
to return entities not associated with a catalog, or null
to return information from all catalogs.schema - The schema to retrieve information from, or the empty string
to return entities not associated with a schema.table - The table name to return information for.columnPattern - A pattern of column names to return information for.ResultSet with the primary key columns.
public int getSQLStateType()
throws SQLException
public ResultSet getSchemas()
throws SQLException
ResultSet, with one column - TABLE_SCHEM - that is the
name of the schema.ResultSet with all the requested schemas.
public String getSearchStringEscape()
throws SQLException
public ResultSet getTables(String catalog,
String schemaPattern,
String tableNamePattern,
String[] types)
throws SQLException
ResultSet with the following columns:
null.
null.
getTableTypes() method.
catalog - The name of the catalog to return tables from,
or "" to return tables from all catalogs.schemaPattern - A schema pattern for the schemas to return tables
from, or "" to return tables from all schemas.namePattern - The pattern of table names to return.types - The list of table types to include; null returns all types.
public String getURL()
throws SQLException
null if it
is not known.
public String getUserName()
throws SQLException
public boolean supportsBatchUpdates()
throws SQLException
true if batch updates are supported,
false otherwise.
public boolean supportsMultipleOpenResults()
throws SQLException
public boolean supportsMultipleResultSets()
throws SQLException
true if multiple result sets are supported for a
single statement, false otherwise.
public boolean supportsMultipleTransactions()
throws SQLException
true if multiple transactions on different
connections are supported, false otherwise.
public boolean supportsNamedParameters()
throws SQLException
public boolean supportsNonNullableColumns()
throws SQLException
true.true if NOT NULL columns are supported,
false otherwise.
public boolean supportsOpenCursorsAcrossCommit()
throws SQLException
true if cursors can remain open across commits,
false otherwise.
public boolean supportsOpenCursorsAcrossRollback()
throws SQLException
true if cursors can remain open across rollbacks,
false otherwise.
public boolean supportsOpenStatementsAcrossCommit()
throws SQLException
true if statements can remain open across commits,
false otherwise.
public boolean supportsOpenStatementsAcrossRollback()
throws SQLException
true if statements can remain open across rollbacks,
false otherwise.
public boolean supportsResultSetConcurrency(int type,
int concurrency)
throws SQLException
type - The desired result type, which is one of the constants
defined in ResultSet.concur - The desired concurrency type, which is one of the constants
defined in ResultSet.true if the result set type is supported,
false otherwise.ResultSet
public boolean supportsResultSetType(int type)
throws SQLException
type - The desired result type, which is one of the constants
defined in ResultSet.true if the result set type is supported,
false otherwise.ResultSet
public boolean supportsTransactionIsolationLevel(int level)
throws SQLException
level - The transaction isolation level.true if the specified transaction isolation level
is supported, false otherwise.
public boolean supportsTransactions()
throws SQLException
true if the database supports transactions,
false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||