|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--superwaba.ext.xplat.sql.DatabaseMetaData
With this class you can get some information regarding a database
Field Summary | |
static short |
attributeNoNulls
|
static short |
attributeNullable
|
static short |
attributeNullableUnknown
|
static int |
bestRowNotPseudo
The best row identifier is not a pseudo-column. |
static int |
bestRowPseudo
The best row identifier is a pseudo-column. |
static int |
bestRowSession
The best row identifier is valid to the end of the session. |
static int |
bestRowTemporary
The best row's scope is only guaranteed to be valid so long as the row is actually being used. |
static int |
bestRowTransaction
The best row identifier is valid to the end of the transaction. |
static int |
bestRowUnknown
The best row may or may not be a pseudo-column. |
static int |
columnNoNulls
The column does not allow NULL |
static int |
columnNullable
The column does allow NULL |
static int |
columnNullableUnknown
It is unknown whether or not the column allows NULL |
static int |
importedKeyCascade
Foreign key changes are cascaded in updates or deletes. |
static int |
importedKeyInitiallyDeferred
Wish I knew what this meant. |
static int |
importedKeyInitiallyImmediate
Wish I knew what this meant. |
static int |
importedKeyNoAction
If the primary key is a foreign key, it cannot be udpated or deleted. |
static int |
importedKeyNotDeferrable
Wish I knew what this meant. |
static int |
importedKeyRestrict
Column may not be updated or deleted in use as a foreign key. |
static int |
importedKeySetDefault
If the primary key is updated or deleted, the foreign key is set to a default value. |
static int |
importedKeySetNull
When primary key is updated or deleted, the foreign key is set to NULL. |
static int |
procedureColumnIn
The column type is input. |
static int |
procedureColumnInOut
The column type is input/output. |
static int |
procedureColumnOut
The column type is output |
static int |
procedureColumnResult
The column is used for storing results |
static int |
procedureColumnReturn
The column is used for return values. |
static int |
procedureColumnUnknown
The column type is unknown. |
static int |
procedureNoNulls
NULL values are not allowed. |
static int |
procedureNoResult
The procedure does not return a result. |
static int |
procedureNullable
NULL values are allowed. |
static int |
procedureNullableUnknown
It is unknown whether or not NULL values are allowed. |
static int |
procedureResultUnknown
It is unknown whether or not the procedure returns a result. |
static int |
procedureReturnsResult
The procedure returns a result. |
static int |
sqlStateSQL99
|
static int |
sqlStateXOpen
|
static short |
tableIndexClustered
This table index is clustered. |
static short |
tableIndexHashed
This table index is hashed. |
static short |
tableIndexOther
This table index is of another type. |
static short |
tableIndexStatistic
This column contains table statistics. |
static int |
typeNoNulls
A NULL value is not allowed for this data type. |
static int |
typeNullable
A NULL value is allowed for this data type. |
static int |
typeNullableUnknown
It is unknown whether or not NULL values are allowed for this data type. |
static int |
typePredBasic
All WHERE clauses except "WHERE..LIKE" style are allowed on this data type. |
static int |
typePredChar
Only "WHERE..LIKE" style WHERE clauses are allowed on this data type. |
static int |
typePredNone
Where clauses are not supported for this type. |
static int |
typeSearchable
Any type of WHERE clause is allowed for this data type. |
static int |
versionColumnNotPseudo
The version column is not a pseudo-column |
static int |
versionColumnPseudo
The version column is a pseudo-column |
static int |
versionColumnUnknown
It is unknown whether or not the version column is a pseudo-column. |
Constructor Summary | |
DatabaseMetaData()
|
Method Summary | |
abstract boolean |
doesMaxRowSizeIncludeBlobs()
This method tests whether or not the maximum row size includes BLOB's |
abstract 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. |
abstract ResultSet |
getColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
This method returns a list of the tables columns for the requested tables. |
abstract Connection |
getConnection()
This method returns the Connection object that was used
to generate the metadata in this object. |
abstract 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. |
abstract int |
getDatabaseMajorVersion()
|
abstract int |
getDatabaseMinorVersion()
|
abstract String |
getDatabaseProductName()
This method returns the name of the database product. |
abstract String |
getDatabaseProductVersion()
This method returns the version of the database product. |
abstract int |
getDefaultTransactionIsolation()
This method returns the default transaction isolation level of the database. |
abstract int |
getDriverMajorVersion()
This method returns the major version number of the JDBC driver. |
abstract int |
getDriverMinorVersion()
This method returns the minor version number of the JDBC driver. |
abstract String |
getDriverName()
This method returns the name of the JDBC driver. |
abstract String |
getDriverVersion()
This method returns the version of the JDBC driver. |
abstract 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. |
abstract String |
getIdentifierQuoteString()
This metohd returns the quote string for SQL identifiers. |
abstract ResultSet |
getImportedKeys(String catalog,
String schema,
String table)
This method returns a list of the table's foreign keys. |
abstract ResultSet |
getIndexInfo(String catalog,
String schema,
String table,
boolean unique,
boolean approximate)
This method returns information about a tables indices and statistics. |
abstract int |
getJDBCMajorVersion()
|
abstract int |
getJDBCMinorVersion()
|
abstract int |
getMaxBinaryLiteralLength()
This method returns the number of hex characters allowed in an inline binary literal. |
abstract int |
getMaxCatalogNameLength()
This method returns the maximum length of a catalog name. |
abstract int |
getMaxCharLiteralLength()
This method returns the maximum length of a character literal. |
abstract int |
getMaxColumnNameLength()
This method returns the maximum length of a column name. |
abstract int |
getMaxColumnsInGroupBy()
This method returns the maximum number of columns in a GROUP BY statement. |
abstract int |
getMaxColumnsInIndex()
This method returns the maximum number of columns in an index. |
abstract int |
getMaxColumnsInOrderBy()
This method returns the maximum number of columns in an ORDER BY statement. |
abstract int |
getMaxColumnsInSelect()
This method returns the maximum number of columns in a SELECT statement. |
abstract int |
getMaxColumnsInTable()
This method returns the maximum number of columns in a table. |
abstract int |
getMaxConnections()
This method returns the maximum number of connections this client can have to the database. |
abstract int |
getMaxCursorNameLength()
This method returns the maximum length of a cursor name. |
abstract int |
getMaxIndexLength()
This method returns the maximum length of an index. |
abstract int |
getMaxProcedureNameLength()
This method returns the maximum length of a procedure name. |
abstract int |
getMaxRowSize()
This method returns the maximum size of a row in bytes. |
abstract int |
getMaxSchemaNameLength()
This method returns the maximum length of a schema name. |
abstract int |
getMaxStatementLength()
This method includes the maximum length of a SQL statement. |
abstract int |
getMaxStatements()
This method returns the maximum number of statements that can be active at any time. |
abstract int |
getMaxTableNameLength()
This method returns the maximum length of a table name. |
abstract int |
getMaxTablesInSelect()
This method returns the maximum number of tables that may be referenced in a SELECT statement. |
abstract int |
getMaxUserNameLength()
This method returns the maximum length of a user name. |
abstract ResultSet |
getPrimaryKeys(String catalog,
String schema,
String table)
This method returns a list of a table's primary key columns. |
abstract 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. |
abstract String |
getSearchStringEscape()
This method returns the string used to escape wildcards in search strings. |
abstract int |
getSQLStateType()
|
abstract 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 .
|
abstract String |
getURL()
This method returns the URL for this database. |
abstract String |
getUserName()
This method returns the database username for this connection. |
abstract boolean |
supportsBatchUpdates()
This method tests whether or not the database supports batch updates. |
abstract boolean |
supportsMultipleOpenResults()
|
abstract boolean |
supportsMultipleResultSets()
This method tests whether multiple result sets for a single statement are supported. |
abstract boolean |
supportsMultipleTransactions()
This method test whether or not multiple transactions may be open at once, as long as they are on different connections. |
abstract boolean |
supportsNamedParameters()
|
abstract boolean |
supportsNonNullableColumns()
This method tests whether or not columns can be defined as NOT NULL. |
abstract boolean |
supportsOpenCursorsAcrossCommit()
This method tests whether or not the database supports cursors remaining open across commits. |
abstract boolean |
supportsOpenCursorsAcrossRollback()
This method tests whether or not the database supports cursors remaining open across rollbacks. |
abstract boolean |
supportsOpenStatementsAcrossCommit()
This method tests whether or not the database supports statements remaining open across commits. |
abstract boolean |
supportsOpenStatementsAcrossRollback()
This method tests whether or not the database supports statements remaining open across rollbacks. |
abstract 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. |
abstract boolean |
supportsResultSetType(int type)
This method tests whether or not the datbase supports the specified result type. |
abstract boolean |
supportsTransactionIsolationLevel(int level)
This method tests whether or not the database supports the specified transaction isolation level. |
abstract 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 |
Field Detail |
public static final int procedureResultUnknown
public static final int procedureNoResult
public static final int procedureReturnsResult
public static final int procedureColumnUnknown
public static final int procedureColumnIn
public static final int procedureColumnInOut
public static final int procedureColumnOut
public static final int procedureColumnReturn
public static final int procedureColumnResult
public static final int procedureNoNulls
public static final int procedureNullable
public static final int procedureNullableUnknown
public static final int columnNoNulls
public static final int columnNullable
public static final int columnNullableUnknown
public static final int bestRowTemporary
public static final int bestRowTransaction
public static final int bestRowSession
public static final int bestRowUnknown
public static final int bestRowNotPseudo
public static final int bestRowPseudo
public static final int versionColumnUnknown
public static final int versionColumnNotPseudo
public static final int versionColumnPseudo
public static final int importedKeyCascade
public static final int importedKeyRestrict
public static final int importedKeySetNull
public static final int importedKeyNoAction
public static final int importedKeySetDefault
public static final int importedKeyInitiallyDeferred
public static final int importedKeyInitiallyImmediate
public static final int importedKeyNotDeferrable
public static final int typeNoNulls
public static final int typeNullable
public static final int typeNullableUnknown
public static final int typePredNone
public static final int typePredChar
public static final int typePredBasic
public static final int typeSearchable
public static final short tableIndexStatistic
public static final short tableIndexClustered
public static final short tableIndexHashed
public static final short tableIndexOther
public static final short attributeNoNulls
public static final short attributeNullable
public static final short attributeNullableUnknown
public static final int sqlStateXOpen
public static final int sqlStateSQL99
Constructor Detail |
public DatabaseMetaData()
Method Detail |
public abstract String getURL() throws SQLException
null
if it
is not known.public abstract String getUserName() throws SQLException
public abstract String getDatabaseProductName() throws SQLException
public abstract String getDatabaseProductVersion() throws SQLException
public abstract String getDriverName() throws SQLException
public abstract String getDriverVersion() throws SQLException
public abstract int getDriverMajorVersion()
public abstract int getDriverMinorVersion()
public abstract String getIdentifierQuoteString() throws SQLException
public abstract String getSearchStringEscape() throws SQLException
public abstract boolean supportsMultipleResultSets() throws SQLException
true
if multiple result sets are supported for a
single statement, false
otherwise.public abstract boolean supportsMultipleTransactions() throws SQLException
true
if multiple transactions on different
connections are supported, false
otherwise.public abstract boolean supportsNonNullableColumns() throws SQLException
true
.true
if NOT NULL columns are supported,
false
otherwise.public abstract boolean supportsOpenCursorsAcrossCommit() throws SQLException
true
if cursors can remain open across commits,
false
otherwise.public abstract boolean supportsOpenCursorsAcrossRollback() throws SQLException
true
if cursors can remain open across rollbacks,
false
otherwise.public abstract boolean supportsOpenStatementsAcrossCommit() throws SQLException
true
if statements can remain open across commits,
false
otherwise.public abstract boolean supportsOpenStatementsAcrossRollback() throws SQLException
true
if statements can remain open across rollbacks,
false
otherwise.public abstract int getMaxBinaryLiteralLength() throws SQLException
public abstract int getMaxCharLiteralLength() throws SQLException
public abstract int getMaxColumnNameLength() throws SQLException
public abstract int getMaxColumnsInGroupBy() throws SQLException
public abstract int getMaxColumnsInIndex() throws SQLException
public abstract int getMaxColumnsInOrderBy() throws SQLException
public abstract int getMaxColumnsInSelect() throws SQLException
public abstract int getMaxColumnsInTable() throws SQLException
public abstract int getMaxConnections() throws SQLException
public abstract int getMaxCursorNameLength() throws SQLException
public abstract int getMaxIndexLength() throws SQLException
public abstract int getMaxSchemaNameLength() throws SQLException
public abstract int getMaxProcedureNameLength() throws SQLException
public abstract int getMaxCatalogNameLength() throws SQLException
public abstract int getMaxRowSize() throws SQLException
public abstract boolean doesMaxRowSizeIncludeBlobs() throws SQLException
true
if the maximum row size includes BLOB's,
false
otherwise.public abstract int getMaxStatementLength() throws SQLException
public abstract int getMaxStatements() throws SQLException
public abstract int getMaxTableNameLength() throws SQLException
public abstract int getMaxTablesInSelect() throws SQLException
public abstract int getMaxUserNameLength() throws SQLException
public abstract int getDefaultTransactionIsolation() throws SQLException
Connection
public abstract boolean supportsTransactions() throws SQLException
true
if the database supports transactions,
false
otherwise.public abstract boolean supportsTransactionIsolationLevel(int level) throws SQLException
level
- The transaction isolation level.true
if the specified transaction isolation level
is supported, false
otherwise.public abstract 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 abstract ResultSet getSchemas() throws SQLException
ResultSet
, with one column - TABLE_SCHEM - that is the
name of the schema.ResultSet
with all the requested schemas.public abstract ResultSet getCatalogs() throws SQLException
ResultSet
with one column - TABLE_CAT - that is the
name of the catalog.ResultSet
with all the requested catalogs.public abstract 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 abstract 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 abstract 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 abstract 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 informationpublic abstract 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 informationpublic abstract 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 informationpublic abstract 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 abstract 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 abstract boolean supportsBatchUpdates() throws SQLException
true
if batch updates are supported,
false
otherwise.public abstract Connection getConnection() throws SQLException
Connection
object that was used
to generate the metadata in this object.public abstract boolean supportsNamedParameters() throws SQLException
public abstract boolean supportsMultipleOpenResults() throws SQLException
public abstract int getDatabaseMajorVersion() throws SQLException
public abstract int getDatabaseMinorVersion() throws SQLException
public abstract int getJDBCMajorVersion() throws SQLException
public abstract int getJDBCMinorVersion() throws SQLException
public abstract int getSQLStateType() throws SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |