superwaba.ext.xplat.sql
Class DatabaseMetaData

java.lang.Object
  |
  +--superwaba.ext.xplat.sql.DatabaseMetaData
Direct Known Subclasses:
Db2eMetaData

public abstract class DatabaseMetaData
extends Object

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

procedureResultUnknown

public static final int procedureResultUnknown
It is unknown whether or not the procedure returns a result.

procedureNoResult

public static final int procedureNoResult
The procedure does not return a result.

procedureReturnsResult

public static final int procedureReturnsResult
The procedure returns a result.

procedureColumnUnknown

public static final int procedureColumnUnknown
The column type is unknown.

procedureColumnIn

public static final int procedureColumnIn
The column type is input.

procedureColumnInOut

public static final int procedureColumnInOut
The column type is input/output.

procedureColumnOut

public static final int procedureColumnOut
The column type is output

procedureColumnReturn

public static final int procedureColumnReturn
The column is used for return values.

procedureColumnResult

public static final int procedureColumnResult
The column is used for storing results

procedureNoNulls

public static final int procedureNoNulls
NULL values are not allowed.

procedureNullable

public static final int procedureNullable
NULL values are allowed.

procedureNullableUnknown

public static final int procedureNullableUnknown
It is unknown whether or not NULL values are allowed.

columnNoNulls

public static final int columnNoNulls
The column does not allow NULL

columnNullable

public static final int columnNullable
The column does allow NULL

columnNullableUnknown

public static final int columnNullableUnknown
It is unknown whether or not the column allows NULL

bestRowTemporary

public static final int bestRowTemporary
The best row's scope is only guaranteed to be valid so long as the row is actually being used.

bestRowTransaction

public static final int bestRowTransaction
The best row identifier is valid to the end of the transaction.

bestRowSession

public static final int bestRowSession
The best row identifier is valid to the end of the session.

bestRowUnknown

public static final int bestRowUnknown
The best row may or may not be a pseudo-column.

bestRowNotPseudo

public static final int bestRowNotPseudo
The best row identifier is not a pseudo-column.

bestRowPseudo

public static final int bestRowPseudo
The best row identifier is a pseudo-column.

versionColumnUnknown

public static final int versionColumnUnknown
It is unknown whether or not the version column is a pseudo-column.

versionColumnNotPseudo

public static final int versionColumnNotPseudo
The version column is not a pseudo-column

versionColumnPseudo

public static final int versionColumnPseudo
The version column is a pseudo-column

importedKeyCascade

public static final int importedKeyCascade
Foreign key changes are cascaded in updates or deletes.

importedKeyRestrict

public static final int importedKeyRestrict
Column may not be updated or deleted in use as a foreign key.

importedKeySetNull

public static final int importedKeySetNull
When primary key is updated or deleted, the foreign key is set to NULL.

importedKeyNoAction

public static final int importedKeyNoAction
If the primary key is a foreign key, it cannot be udpated or deleted.

importedKeySetDefault

public static final int importedKeySetDefault
If the primary key is updated or deleted, the foreign key is set to a default value.

importedKeyInitiallyDeferred

public static final int importedKeyInitiallyDeferred
Wish I knew what this meant.

importedKeyInitiallyImmediate

public static final int importedKeyInitiallyImmediate
Wish I knew what this meant.

importedKeyNotDeferrable

public static final int importedKeyNotDeferrable
Wish I knew what this meant.

typeNoNulls

public static final int typeNoNulls
A NULL value is not allowed for this data type.

typeNullable

public static final int typeNullable
A NULL value is allowed for this data type.

typeNullableUnknown

public static final int typeNullableUnknown
It is unknown whether or not NULL values are allowed for this data type.

typePredNone

public static final int typePredNone
Where clauses are not supported for this type.

typePredChar

public static final int typePredChar
Only "WHERE..LIKE" style WHERE clauses are allowed on this data type.

typePredBasic

public static final int typePredBasic
All WHERE clauses except "WHERE..LIKE" style are allowed on this data type.

typeSearchable

public static final int typeSearchable
Any type of WHERE clause is allowed for this data type.

tableIndexStatistic

public static final short tableIndexStatistic
This column contains table statistics.

tableIndexClustered

public static final short tableIndexClustered
This table index is clustered.

tableIndexHashed

public static final short tableIndexHashed
This table index is hashed.

tableIndexOther

public static final short tableIndexOther
This table index is of another type.

attributeNoNulls

public static final short attributeNoNulls

attributeNullable

public static final short attributeNullable

attributeNullableUnknown

public static final short attributeNullableUnknown

sqlStateXOpen

public static final int sqlStateXOpen

sqlStateSQL99

public static final int sqlStateSQL99
Constructor Detail

DatabaseMetaData

public DatabaseMetaData()
Method Detail

getURL

public abstract String getURL()
                       throws SQLException
This method returns the URL for this database.
Returns:
The URL string for this database, or null if it is not known.
Throws:
SQLException - If an error occurs.

getUserName

public abstract String getUserName()
                            throws SQLException
This method returns the database username for this connection.
Returns:
The database username.
Throws:
SQLException - If an error occurs.

getDatabaseProductName

public abstract String getDatabaseProductName()
                                       throws SQLException
This method returns the name of the database product.
Returns:
The database product.
Throws:
SQLException - If an error occurs.

getDatabaseProductVersion

public abstract String getDatabaseProductVersion()
                                          throws SQLException
This method returns the version of the database product.
Returns:
The version of the database product.
Throws:
SQLException - If an error occurs.

getDriverName

public abstract String getDriverName()
                              throws SQLException
This method returns the name of the JDBC driver.
Returns:
The name of the JDBC driver.
Throws:
SQLException - If an error occurs.

getDriverVersion

public abstract String getDriverVersion()
                                 throws SQLException
This method returns the version of the JDBC driver.
Returns:
The version of the JDBC driver.
Throws:
SQLException - If an error occurs.

getDriverMajorVersion

public abstract int getDriverMajorVersion()
This method returns the major version number of the JDBC driver.
Returns:
The major version number of the JDBC driver.

getDriverMinorVersion

public abstract int getDriverMinorVersion()
This method returns the minor version number of the JDBC driver.
Returns:
The minor version number of the JDBC driver.

getIdentifierQuoteString

public abstract String getIdentifierQuoteString()
                                         throws SQLException
This metohd returns the quote string for SQL identifiers. Returns a space " " if identifier quoting isn't supported.
Returns:
The quote string for SQL identifers, or a space if quoting is not supported.
Throws:
SQLException - If an error occurs.

getSearchStringEscape

public abstract String getSearchStringEscape()
                                      throws SQLException
This method returns the string used to escape wildcards in search strings.
Returns:
The string used to escape wildcards in search strings.
Throws:
SQLException - If an error occurs.

supportsMultipleResultSets

public abstract boolean supportsMultipleResultSets()
                                            throws SQLException
This method tests whether multiple result sets for a single statement are supported.
Returns:
true if multiple result sets are supported for a single statement, false otherwise.
Throws:
SQLException - If an error occurs.

supportsMultipleTransactions

public abstract boolean supportsMultipleTransactions()
                                              throws SQLException
This method test whether or not multiple transactions may be open at once, as long as they are on different connections.
Returns:
true if multiple transactions on different connections are supported, false otherwise.
Throws:
SQLException - If an error occurs.

supportsNonNullableColumns

public abstract boolean supportsNonNullableColumns()
                                            throws SQLException
This method tests whether or not columns can be defined as NOT NULL. A fully JDBC compliant driver always returns true.
Returns:
true if NOT NULL columns are supported, false otherwise.
Throws:
SQLException - If an error occurs.

supportsOpenCursorsAcrossCommit

public abstract boolean supportsOpenCursorsAcrossCommit()
                                                 throws SQLException
This method tests whether or not the database supports cursors remaining open across commits.
Returns:
true if cursors can remain open across commits, false otherwise.
Throws:
SQLException - If an error occurs.

supportsOpenCursorsAcrossRollback

public abstract boolean supportsOpenCursorsAcrossRollback()
                                                   throws SQLException
This method tests whether or not the database supports cursors remaining open across rollbacks.
Returns:
true if cursors can remain open across rollbacks, false otherwise.
Throws:
SQLException - If an error occurs.

supportsOpenStatementsAcrossCommit

public abstract boolean supportsOpenStatementsAcrossCommit()
                                                    throws SQLException
This method tests whether or not the database supports statements remaining open across commits.
Returns:
true if statements can remain open across commits, false otherwise.
Throws:
SQLException - If an error occurs.

supportsOpenStatementsAcrossRollback

public abstract boolean supportsOpenStatementsAcrossRollback()
                                                      throws SQLException
This method tests whether or not the database supports statements remaining open across rollbacks.
Returns:
true if statements can remain open across rollbacks, false otherwise.
Throws:
SQLException - If an error occurs.

getMaxBinaryLiteralLength

public abstract int getMaxBinaryLiteralLength()
                                       throws SQLException
This method returns the number of hex characters allowed in an inline binary literal.
Returns:
The number of hex characters allowed in a binary literal, 0 meaning either an unknown or unlimited number.
Throws:
SQLException - If an error occurs.

getMaxCharLiteralLength

public abstract int getMaxCharLiteralLength()
                                     throws SQLException
This method returns the maximum length of a character literal.
Returns:
The maximum length of a character literal.
Throws:
SQLException - If an error occurs.

getMaxColumnNameLength

public abstract int getMaxColumnNameLength()
                                    throws SQLException
This method returns the maximum length of a column name.
Returns:
The maximum length of a column name.
Throws:
SQLException - If an error occurs.

getMaxColumnsInGroupBy

public abstract int getMaxColumnsInGroupBy()
                                    throws SQLException
This method returns the maximum number of columns in a GROUP BY statement.
Returns:
The maximum number of columns in a GROUP BY statement.
Throws:
SQLException - If an error occurs.

getMaxColumnsInIndex

public abstract int getMaxColumnsInIndex()
                                  throws SQLException
This method returns the maximum number of columns in an index.
Returns:
The maximum number of columns in an index.
Throws:
SQLException - If an error occurs.

getMaxColumnsInOrderBy

public abstract int getMaxColumnsInOrderBy()
                                    throws SQLException
This method returns the maximum number of columns in an ORDER BY statement.
Returns:
The maximum number of columns in an ORDER BY statement.
Throws:
SQLException - If an error occurs.

getMaxColumnsInSelect

public abstract int getMaxColumnsInSelect()
                                   throws SQLException
This method returns the maximum number of columns in a SELECT statement.
Returns:
The maximum number of columns in a SELECT statement.
Throws:
SQLException - If an error occurs.

getMaxColumnsInTable

public abstract int getMaxColumnsInTable()
                                  throws SQLException
This method returns the maximum number of columns in a table.
Returns:
The maximum number of columns in a table.
Throws:
SQLException - If an error occurs.

getMaxConnections

public abstract int getMaxConnections()
                               throws SQLException
This method returns the maximum number of connections this client can have to the database.
Returns:
The maximum number of database connections.

getMaxCursorNameLength

public abstract int getMaxCursorNameLength()
                                    throws SQLException
This method returns the maximum length of a cursor name.
Returns:
The maximum length of a cursor name.
Throws:
SQLException - If an error occurs.

getMaxIndexLength

public abstract int getMaxIndexLength()
                               throws SQLException
This method returns the maximum length of an index.
Returns:
The maximum length of an index.
Throws:
SQLException - If an error occurs.

getMaxSchemaNameLength

public abstract int getMaxSchemaNameLength()
                                    throws SQLException
This method returns the maximum length of a schema name.
Returns:
The maximum length of a schema name.
Throws:
SQLException - If an error occurs.

getMaxProcedureNameLength

public abstract int getMaxProcedureNameLength()
                                       throws SQLException
This method returns the maximum length of a procedure name.
Returns:
The maximum length of a procedure name.
Throws:
SQLException - If an error occurs.

getMaxCatalogNameLength

public abstract int getMaxCatalogNameLength()
                                     throws SQLException
This method returns the maximum length of a catalog name.
Returns:
The maximum length of a catalog name.
Throws:
SQLException - If an error occurs.

getMaxRowSize

public abstract int getMaxRowSize()
                           throws SQLException
This method returns the maximum size of a row in bytes.
Returns:
The maximum size of a row.
Throws:
SQLException - If an error occurs.

doesMaxRowSizeIncludeBlobs

public abstract boolean doesMaxRowSizeIncludeBlobs()
                                            throws SQLException
This method tests whether or not the maximum row size includes BLOB's
Returns:
true if the maximum row size includes BLOB's, false otherwise.
Throws:
SQLException - If an error occurs.

getMaxStatementLength

public abstract int getMaxStatementLength()
                                   throws SQLException
This method includes the maximum length of a SQL statement.
Returns:
The maximum length of a SQL statement.
Throws:
SQLException - If an error occurs.

getMaxStatements

public abstract int getMaxStatements()
                              throws SQLException
This method returns the maximum number of statements that can be active at any time.
Returns:
The maximum number of statements that can be active at any time.
Throws:
SQLException - If an error occurs.

getMaxTableNameLength

public abstract int getMaxTableNameLength()
                                   throws SQLException
This method returns the maximum length of a table name.
Returns:
The maximum length of a table name.
Throws:
SQLException - If an error occurs.

getMaxTablesInSelect

public abstract int getMaxTablesInSelect()
                                  throws SQLException
This method returns the maximum number of tables that may be referenced in a SELECT statement.
Returns:
The maximum number of tables allowed in a SELECT statement.
Throws:
SQLException - If an error occurs.

getMaxUserNameLength

public abstract int getMaxUserNameLength()
                                  throws SQLException
This method returns the maximum length of a user name.
Returns:
The maximum length of a user name.
Throws:
SQLException - If an error occurs.

getDefaultTransactionIsolation

public abstract int getDefaultTransactionIsolation()
                                            throws SQLException
This method returns the default transaction isolation level of the database.
Returns:
The default transaction isolation level of the database.
Throws:
SQLException - If an error occurs.
See Also:
Connection

supportsTransactions

public abstract boolean supportsTransactions()
                                      throws SQLException
This method tests whether or not the database supports transactions.
Returns:
true if the database supports transactions, false otherwise.
Throws:
SQLException - If an error occurs.

supportsTransactionIsolationLevel

public abstract boolean supportsTransactionIsolationLevel(int level)
                                                   throws SQLException
This method tests whether or not the database supports the specified transaction isolation level.
Parameters:
level - The transaction isolation level.
Returns:
true if the specified transaction isolation level is supported, false otherwise.
Throws:
SQLException - If an error occurs.

getTables

public abstract ResultSet getTables(String catalog,
                                    String schemaPattern,
                                    String tableNamePattern,
                                    String[] types)
                             throws SQLException
This method returns a list of the requested table as a ResultSet with the following columns:

  1. TABLE_CAT - The catalog the table is in, which may be null.
  2. TABLE_SCHEM - The schema the table is in, which may be null.
  3. TABLE_NAME - The name of the table.
  4. TABLE_TYPE - A string describing the table type. This will be one of the values returned by the getTableTypes() method.
  5. REMARKS - Comments about the table.
Parameters:
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.
Throws:
SQLException - If an error occurs.

getSchemas

public abstract ResultSet getSchemas()
                              throws SQLException
This method returns the list of database schemas as a ResultSet, with one column - TABLE_SCHEM - that is the name of the schema.
Returns:
A ResultSet with all the requested schemas.
Throws:
SQLException - If an error occurs.

getCatalogs

public abstract ResultSet getCatalogs()
                               throws SQLException
This method returns the list of database catalogs as a ResultSet with one column - TABLE_CAT - that is the name of the catalog.
Returns:
A ResultSet with all the requested catalogs.
Throws:
SQLException - If an error occurs.

getColumns

public abstract ResultSet getColumns(String catalog,
                                     String schemaPattern,
                                     String tableNamePattern,
                                     String columnNamePattern)
                              throws SQLException
This method returns a list of the tables columns for the requested tables. This is returned in the form of a ResultSet with the following columns:

  1. TABLE_CAT - The catalog the table is in, which may be null.
  2. TABLE_SCHEM - The schema the tables is in, which may be null.
  3. TABLE_NAME - The name of the table.
  4. COLUMN_NAME - The name of the column
  5. DATA_TYPE - The SQL type of the column. This is one of the constants defined in Types.
  6. TYPE_NAME - The string name of the data type for this column.
  7. COLUMN_SIZE - The size of the column.
  8. Unused
  9. NUM_PREC_RADIX - The radix of the column.
  10. NULLABLE - Whether or not the column is NULLABLE. This is one of the constants defined in this class (tableNoNulls, tableNullable, or tableNullableUnknown)
  11. REMARKS - A description of the column.
  12. COLUMN_DEF - The default value for the column, may be null.
  13. SQL_DATA_TYPE - Unused
  14. SQL_DATETIME_SUB - Unused
  15. CHAR_OCTET_LENGTH - For character columns, the maximum number of bytes in the column.
  16. ORDINAL_POSITION - The index of the column in the table.
  17. IS_NULLABLE - "NO" means no, "YES" means maybe, and an empty string means unknown.
Parameters:
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.
Throws:
SQLException - If an error occurs.

getPrimaryKeys

public abstract ResultSet getPrimaryKeys(String catalog,
                                         String schema,
                                         String table)
                                  throws SQLException
This method returns a list of a table's primary key columns. These are returned as a ResultSet with the following columns.

  1. TABLE_CAT - The catalog of the table, which may be null.
  2. TABLE_SCHEM - The schema of the table, which may be null.
  3. TABLE_NAME - The name of the table.
  4. COLUMN_NAME - The name of the column.
  5. KEY_SEQ - The sequence number of the column within the primary key.
  6. PK_NAME - The name of the primary key, which may be null.
Parameters:
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.
Returns:
A ResultSet with the primary key columns.
Throws:
SQLException - If an error occurs.

getImportedKeys

public abstract ResultSet getImportedKeys(String catalog,
                                          String schema,
                                          String table)
                                   throws SQLException
This method returns a list of the table's foreign keys. These are returned as a ResultSet with the following columns:

  1. PKTABLE_CAT - The catalog of the table the key was imported from.
  2. PKTABLE_SCHEM - The schema of the table the key was imported from.
  3. PKTABLE_NAME - The name of the table the key was imported from.
  4. PKCOLUMN_NAME - The name of the column that was imported.
  5. FKTABLE_CAT - The foreign key catalog name.
  6. FKTABLE_SCHEM - The foreign key schema name.
  7. FKTABLE_NAME - The foreign key table name.
  8. FKCOLUMN_NAME - The foreign key column name.
  9. KEY_SEQ - The sequence number of the column within the foreign key.
  10. UPDATE_RULE - How the foreign key behaves when the primary key is updated. This is one of the constants defined in this class (importedNoAction, importedKeyCascade, importedKeySetNull, importedKeySetDefault, or importedKeyRestrict).
  11. DELETE_RULE - How the foreign key behaves when the primary key is deleted. This is one of the constants defined in this class (importedNoAction, importedKeyCascade, importedKeySetNull, or importedKeySetDefault)
  12. FK_NAME - The name of the foreign key.
  13. PK_NAME - The name of the primary key.
  14. DEFERRABILITY - The deferrability value. This is one of the constants defined in this table (importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, or importedKeyNotDeferrable).
Parameters:
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.
Returns:
A ResultSet with the foreign key columns.
Throws:
SQLException - If an error occurs.

getExportedKeys

public abstract ResultSet getExportedKeys(String catalog,
                                          String schema,
                                          String table)
                                   throws SQLException
This method returns a list of the table's which use this table's primary key as a foreign key. The information is returned as a ResultSet with the following columns:

  1. PKTABLE_CAT - The catalog of the table the key was imported from.
  2. PKTABLE_SCHEM - The schema of the table the key was imported from.
  3. PKTABLE_NAME - The name of the table the key was imported from.
  4. PKCOLUMN_NAME - The name of the column that was imported.
  5. FKTABLE_CAT - The foreign key catalog name.
  6. FKTABLE_SCHEM - The foreign key schema name.
  7. FKTABLE_NAME - The foreign key table name.
  8. FKCOLUMN_NAME - The foreign key column name.
  9. KEY_SEQ - The sequence number of the column within the foreign key.
  10. UPDATE_RULE - How the foreign key behaves when the primary key is updated. This is one of the constants defined in this class (importedNoAction, importedKeyCascade, importedKeySetNull, importedKeySetDefault, or importedKeyRestrict).
  11. DELETE_RULE - How the foreign key behaves when the primary key is deleted. This is one of the constants defined in this class (importedNoAction, importedKeyCascade, importedKeySetNull, or importedKeySetDefault)
  12. FK_NAME - The name of the foreign key.
  13. PK_NAME - The name of the primary key.
  14. DEFERRABILITY - The deferrability value. This is one of the constants defined in this table (importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, or importedKeyNotDeferrable).
Parameters:
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.
Returns:
A ResultSet with the requested information
Throws:
SQLException - If an error occurs.

getCrossReference

public abstract ResultSet getCrossReference(String primaryCatalog,
                                            String primarySchema,
                                            String primaryTable,
                                            String foreignCatalog,
                                            String foreignSchema,
                                            String foreignTable)
                                     throws SQLException
This method returns a description of how one table imports another table's primary key as a foreign key. The information is returned as a ResultSet with the following columns:

  1. PKTABLE_CAT - The catalog of the table the key was imported from.
  2. PKTABLE_SCHEM - The schema of the table the key was imported from.
  3. PKTABLE_NAME - The name of the table the key was imported from.
  4. PKCOLUMN_NAME - The name of the column that was imported.
  5. FKTABLE_CAT - The foreign key catalog name.
  6. FKTABLE_SCHEM - The foreign key schema name.
  7. FKTABLE_NAME - The foreign key table name.
  8. FKCOLUMN_NAME - The foreign key column name.
  9. KEY_SEQ - The sequence number of the column within the foreign key.
  10. UPDATE_RULE - How the foreign key behaves when the primary key is updated. This is one of the constants defined in this class (importedNoAction, importedKeyCascade, importedKeySetNull, importedKeySetDefault, or importedKeyRestrict).
  11. DELETE_RULE - How the foreign key behaves when the primary key is deleted. This is one of the constants defined in this class (importedNoAction, importedKeyCascade, importedKeySetNull, or importedKeySetDefault)
  12. FK_NAME - The name of the foreign key.
  13. PK_NAME - The name of the primary key.
  14. DEFERRABILITY - The deferrability value. This is one of the constants defined in this table (importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, or importedKeyNotDeferrable).
Parameters:
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.
Returns:
A ResultSet with the requested information
Throws:
SQLException - If an error occurs.

getIndexInfo

public abstract ResultSet getIndexInfo(String catalog,
                                       String schema,
                                       String table,
                                       boolean unique,
                                       boolean approximate)
                                throws SQLException
This method returns information about a tables indices and statistics. It is returned as a ResultSet with the following columns:

  1. TABLE_CAT - The catalog of the table, which may be null.
  2. TABLE_SCHEM - The schema of the table, which may be null.
  3. TABLE_NAME - The name of the table.
  4. NON_UNIQUE - Are index values non-unique?
  5. INDEX_QUALIFIER The index catalog, which may be null
  6. INDEX_NAME - The name of the index.
  7. TYPE - The type of index, which will be one of the constants defined in this interface (tableIndexStatistic, tableIndexClustered, tableIndexHashed, or tableIndexOther).
  8. ORDINAL_POSITION - The sequence number of this column in the index. This will be 0 when the index type is tableIndexStatistic.
  9. COLUMN_NAME - The name of this column in the index.
  10. ASC_OR_DESC - "A" for an ascending sort sequence, "D" for a descending sort sequence or null if a sort sequence is not supported.
  11. CARDINALITY - The number of unique rows in the index, or the number of rows in the table if the index type is tableIndexStatistic.
  12. PAGES - The number of pages used for the index, or the number of pages in the table if the index type is tableIndexStatistic.
  13. FILTER_CONDITION - The filter condition for this index, which may be null.
Parameters:
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.
Returns:
A ResultSet with the requested index information
Throws:
SQLException - If an error occurs.

supportsResultSetType

public abstract boolean supportsResultSetType(int type)
                                       throws SQLException
This method tests whether or not the datbase supports the specified result type.
Parameters:
type - The desired result type, which is one of the constants defined in ResultSet.
Returns:
true if the result set type is supported, false otherwise.
Throws:
SQLException - If an error occurs.
See Also:
ResultSet

supportsResultSetConcurrency

public abstract boolean supportsResultSetConcurrency(int type,
                                                     int concurrency)
                                              throws SQLException
This method tests whether the specified result set type and result set concurrency type are supported by the database.
Parameters:
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.
Returns:
true if the result set type is supported, false otherwise.
Throws:
SQLException - If an error occurs.
See Also:
ResultSet

supportsBatchUpdates

public abstract boolean supportsBatchUpdates()
                                      throws SQLException
This method tests whether or not the database supports batch updates.
Returns:
true if batch updates are supported, false otherwise.
Throws:
SQLException - If an error occurs.

getConnection

public abstract Connection getConnection()
                                  throws SQLException
This method returns the Connection object that was used to generate the metadata in this object.
Returns:
The connection for this object.
Throws:
SQLException - If an error occurs.

supportsNamedParameters

public abstract boolean supportsNamedParameters()
                                         throws SQLException
Since:
1.4 NOTE: removed from SW

supportsMultipleOpenResults

public abstract boolean supportsMultipleOpenResults()
                                             throws SQLException
Since:
1.4

getDatabaseMajorVersion

public abstract int getDatabaseMajorVersion()
                                     throws SQLException
Since:
1.4

getDatabaseMinorVersion

public abstract int getDatabaseMinorVersion()
                                     throws SQLException
Since:
1.4

getJDBCMajorVersion

public abstract int getJDBCMajorVersion()
                                 throws SQLException
Since:
1.4

getJDBCMinorVersion

public abstract int getJDBCMinorVersion()
                                 throws SQLException
Since:
1.4

getSQLStateType

public abstract int getSQLStateType()
                             throws SQLException
Since:
1.4