com.ibm.as400.access
Class AS400JDBCDatabaseMetaData

java.lang.Object
  extended by com.ibm.as400.access.AS400JDBCDatabaseMetaData
All Implemented Interfaces:
DatabaseMetaData, Wrapper

public class AS400JDBCDatabaseMetaData
extends Object
implements DatabaseMetaData

The AS400JDBCDatabaseMetaData class provides information about the database as a whole.

Some of the methods in this class take arguments that are pattern strings. Such arguments are suffixed with "Pattern". Within a pattern string, "%" means match any substring of zero or more characters, and "_" means match exactly one character. Only entries matching the pattern string are returned.

For example, if the schemaPattern argument for getTables() is "H%WO_LD", then the following schemas might match the pattern, provided they exist on the system:

HELLOWORLD
HIWORLD
HWORLD
HELLOWOULD
HIWOULD

Many of the methods here return lists of information in result sets. You can use the normal ResultSet methods to retrieve data from these result sets. The format of the result sets are described in the JDBC interface specification.

Schema and table names that are passed as input to methods in this class are implicitly uppercased unless enclosed in double-quotes.


Field Summary
Modifier and Type Field and Description
static int sqlStateSQL99
           
static int sqlStateXOpen
           
 
Fields inherited from interface java.sql.DatabaseMetaData
attributeNoNulls, attributeNullable, attributeNullableUnknown, bestRowNotPseudo, bestRowPseudo, bestRowSession, bestRowTemporary, bestRowTransaction, bestRowUnknown, columnNoNulls, columnNullable, columnNullableUnknown, functionColumnIn, functionColumnInOut, functionColumnOut, functionColumnResult, functionColumnUnknown, functionNoNulls, functionNoTable, functionNullable, functionNullableUnknown, functionResultUnknown, functionReturn, functionReturnsTable, importedKeyCascade, importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, importedKeyNoAction, importedKeyNotDeferrable, importedKeyRestrict, importedKeySetDefault, importedKeySetNull, procedureColumnIn, procedureColumnInOut, procedureColumnOut, procedureColumnResult, procedureColumnReturn, procedureColumnUnknown, procedureNoNulls, procedureNoResult, procedureNullable, procedureNullableUnknown, procedureResultUnknown, procedureReturnsResult, sqlStateSQL, tableIndexClustered, tableIndexHashed, tableIndexOther, tableIndexStatistic, typeNoNulls, typeNullable, typeNullableUnknown, typePredBasic, typePredChar, typePredNone, typeSearchable, versionColumnNotPseudo, versionColumnPseudo, versionColumnUnknown
 
Method Summary
Modifier and Type Method and Description
 boolean allProceduresAreCallable()
          Indicates if all of the procedures returned by getProcedures() can be called by the current user.
 boolean allTablesAreSelectable()
          Indicates if all of the tables returned by getTables() can be SELECTed by the current user.
 boolean dataDefinitionCausesTransactionCommit()
          Indicates if a data definition statement within a transaction can force the transaction to commit.
 boolean dataDefinitionIgnoredInTransactions()
          Indicates if a data definition statement within a transaction is ignored.
 boolean deletesAreDetected(int resultSetType)
          Indicates if visible deletes to a result set of the specified type can be detected by calling ResultSet.rowDeleted().
 boolean doesMaxRowSizeIncludeBlobs()
          Indicates if getMaxRowSize() includes blobs when computing the maximum length of a single row.
 ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)
          Returns a ResultSet containing a description of type attributes available in a specified catalog.
 ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)
          Returns a description of a table's optimal set of columns that uniquely identifies a row.
 ResultSet getCatalogs()
          Returns the catalog name available in this database.
 String getCatalogSeparator()
          Returns the naming convention used when referring to tables.
 String getCatalogTerm()
          Returns the DB2 for IBM i SQL term for "catalog".
 ResultSet getClientInfoProperties()
          Retrieves a list of the client info properties that the driver supports.
 ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnPattern)
          Returns a description of the access rights for a table's columns.
 ResultSet getColumns(String catalog, String schemaPattern, String tablePattern, String columnPattern)
          Returns a description of the table's columns available in a catalog.
 Connection getConnection()
          Returns the connection for this metadata.
 ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable)
          Returns a description of the foreign key columns in the foreign key table that references the primary key columns of the primary key table.
 int getDatabaseMajorVersion()
          Returns the major version number of the database.
 int getDatabaseMinorVersion()
          Returns the minor version number of the database.
 String getDatabaseProductName()
          Returns the name of this database product.
 String getDatabaseProductVersion()
          Returns the version of this database product.
 int getDefaultTransactionIsolation()
          Returns the default transaction isolation level.
 int getDriverMajorVersion()
          Returns the major version number for this JDBC driver.
 int getDriverMinorVersion()
          Returns the minor version number for this JDBC driver.
 String getDriverName()
          Returns the name of this JDBC driver.
 String getDriverVersion()
          Returns the version of this JDBC driver.
 ResultSet getExportedKeys(String catalog, String schema, String table)
          Returns a description of the foreign key columns that reference a table's primary key columns.
 String getExtraNameCharacters()
          Returns all of the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9, and _).
 ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern)
          Retrieves a description of the given catalog's system or user function parameters and return type.
 ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern)
          Retrieves a description of the user functions available in the given catalog.
 String getIdentifierQuoteString()
          Returns the string used to quote SQL identifiers.
 ResultSet getImportedKeys(String catalog, String schema, String table)
          Returns a description of the primary key columns that are referenced by a table's foreign key columns.
 ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)
          Returns a description of a table's indexes and statistics.
 int getJDBCMajorVersion()
          Returns the JDBC major version number.
 int getJDBCMinorVersion()
          Returns the JDBC minor version number.
 int getMaxBinaryLiteralLength()
          Returns the maximum length for an inline binary literal.
 int getMaxCatalogNameLength()
          Returns the maximum length for a catalog name.
 int getMaxCharLiteralLength()
          Returns the maximum length for a character literal.
 int getMaxColumnNameLength()
          Returns the maximum length for a column name.
 int getMaxColumnsInGroupBy()
          Returns the maximum number of columns in a GROUP BY clause.
 int getMaxColumnsInIndex()
          Returns the maximum number of columns allowed in an index.
 int getMaxColumnsInOrderBy()
          Returns the maximum number of columns in an ORDER BY clause.
 int getMaxColumnsInSelect()
          Returns the maximum number of columns in a SELECT list.
 int getMaxColumnsInTable()
          Returns the maximum number of columns in a table.
 int getMaxConnections()
          Returns the number of active connections you can have at a time to this database.
 int getMaxCursorNameLength()
          Returns the maximum cursor name length.
 int getMaxIndexLength()
          Returns the maximum length of an index.
 int getMaxProcedureNameLength()
          Returns the maximum length of a procedure name.
 int getMaxRowSize()
          Returns the maximum length of a single row.
 int getMaxSchemaNameLength()
          Returns the maximum length allowed for a schema name.
 int getMaxStatementLength()
          Returns the maximum length of an SQL statement.
 int getMaxStatements()
          Returns the number of active statements you can have open at one time.
 int getMaxTableNameLength()
          Returns the maximum length of a table name.
 int getMaxTablesInSelect()
          Returns the maximum number of tables in a SELECT.
 int getMaxUserNameLength()
          Returns the maximum length of a user name.
 String getNumericFunctions()
          Returns the list of supported math functions.
 ResultSet getPrimaryKeys(String catalog, String schema, String table)
          Returns a description of the primary key columns.
 ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedurePattern, String columnPattern)
          Returns a description of a catalog's stored procedure parameters and result columns.
 ResultSet getProcedures(String catalog, String schemaPattern, String procedurePattern)
          Returns the description of the stored procedures available in a catalog.
 String getProcedureTerm()
          Returns the DB2 for IBM i SQL term for "procedure".
 int getResultSetHoldability()
          Retrieves the default holdability of this ResultSet object.
 ResultSet getSchemas()
          Returns the schema names available in this database.
 ResultSet getSchemas(String catalog, String schemaPattern)
          Retrieves the schema names available in this database.
 String getSchemaTerm()
          Returns the DB2 for IBM i SQL term for "schema".
 String getSearchStringEscape()
          Returns the string used to escape wildcard characters.
 String getSQLKeywords()
          Returns the list of all of the database's SQL keywords that are not also SQL92 keywords.
 int getSQLStateType()
          Indicates whether the SQLSTATEs returned by SQLException.getSQLState is X/Open SQL CLI or SQL99.
 String getStringFunctions()
          Returns the list of supported string functions.
 ResultSet getSuperTables(String catalog, String schemaPattern, String typeNamePattern)
          Returns a ResultSet containing descriptions of the table hierarchies in a schema.
 ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern)
          Returns a ResultSet containing descriptions of user-defined type hierarchies in a schema.
 String getSystemFunctions()
          Returns the list of supported system functions.
 ResultSet getTablePrivileges(String catalog, String schemaPattern, String tablePattern)
          Returns the description of the access rights for each table available in a catalog.
 ResultSet getTables(String catalog, String schemaPattern, String tablePattern, String[] tableTypes)
          Returns the description of the tables available in a catalog.
 ResultSet getTableTypes()
          Returns the table types available in this database.
 String getTimeDateFunctions()
          Returns the list of supported time and date functions.
 ResultSet getTypeInfo()
          Returns a description of all of the standard SQL types supported by this database.
 ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)
          Returns the description of the user-defined types available in a catalog.
 String getURL()
          Returns the URL for this database.
 String getUserName()
          Returns the current user name as known to the database.
 ResultSet getVersionColumns(String catalog, String schema, String table)
          Returns a description of a table's columns that are automatically updated when any value in a row is updated.
 boolean insertsAreDetected(int resultSetType)
          Indicates if visible inserts to a result set of the specified type can be detected by calling ResultSet.rowInserted().
 boolean isCatalogAtStart()
          Indicates if a catalog appears at the start or the end of a qualified name.
 boolean isReadOnly()
          Indicates if the database is in read-only mode.
 boolean locatorsUpdateCopy()
          Indicates if updateable LOB methods update a copy of the LOB or if updates are made directly to the LOB.
 boolean nullPlusNonNullIsNull()
          Indicates if concatenations between null and non-null values are null.
 boolean nullsAreSortedAtEnd()
          Indicates if null values are sorted at the end regardless of sort order.
 boolean nullsAreSortedAtStart()
          Indicates if null values are sorted at the start regardless of sort order.
 boolean nullsAreSortedHigh()
          Indicates if null values are sorted high.
 boolean nullsAreSortedLow()
          Indicates if null values are sorted low.
 boolean othersDeletesAreVisible(int resultSetType)
          Indicates if deletes made by others are visible.
 boolean othersInsertsAreVisible(int resultSetType)
          Indicates if inserts made by others are visible.
 boolean othersUpdatesAreVisible(int resultSetType)
          Indicates if updates made by others are visible.
 boolean ownDeletesAreVisible(int resultSetType)
          Indicates if a result set's own deletes are visible.
 boolean ownInsertsAreVisible(int resultSetType)
          Indicates if a result set's own inserts are visible.
 boolean ownUpdatesAreVisible(int resultSetType)
          Indicates if a result set's own updates are visible.
 boolean storesLowerCaseIdentifiers()
          Indicates if the database treats mixed case, unquoted SQL identifiers as case insensitive and stores them in lowercase.
 boolean storesLowerCaseQuotedIdentifiers()
          Indicates if the database treats mixed case, quoted SQL identifiers as case insensitive and stores them in lowercase.
 boolean storesMixedCaseIdentifiers()
          Indicates if the database treats mixed case, unquoted SQL identifiers as case insensitive and stores them in mixed case.
 boolean storesMixedCaseQuotedIdentifiers()
          Indicates if the database treats mixed case, quoted SQL identifiers as case insensitive and stores them in mixed case.
 boolean storesUpperCaseIdentifiers()
          Indicates if the database treats mixed case, unquoted SQL identifiers as case insensitive and stores them in uppercase.
 boolean storesUpperCaseQuotedIdentifiers()
          Indicates if the database treats mixed case, quoted SQL identifiers as case insensitive and stores them in uppercase.
 boolean supportsAlterTableWithAddColumn()
          Indicates if ALTER TABLE with ADD COLUMN is supported.
 boolean supportsAlterTableWithDropColumn()
          Indicates if ALTER TABLE with DROP COLUMN is supported.
 boolean supportsANSI92EntryLevelSQL()
          Indicates if the ANSI92 entry-level SQL grammar is supported.
 boolean supportsANSI92FullSQL()
          Indicates if the ANSI92, full SQL grammar is supported.
 boolean supportsANSI92IntermediateSQL()
          Indicates if the ANSI92 intermediate-level SQL grammar is supported.
 boolean supportsBatchUpdates()
          Indicates if the batch updates are supported.
 boolean supportsCatalogsInDataManipulation()
          Indicates if a catalog name can be used in a data manipulation statement.
 boolean supportsCatalogsInIndexDefinitions()
          Indicates if a catalog name can be used in an index definition statement.
 boolean supportsCatalogsInPrivilegeDefinitions()
          Indicates if a catalog name can be used in a privilege definition statement.
 boolean supportsCatalogsInProcedureCalls()
          Indicates if a catalog name can be used in a procedure call statement.
 boolean supportsCatalogsInTableDefinitions()
          Indicates if a catalog name can be used in a table definition statement.
 boolean supportsColumnAliasing()
          Indicates if column aliasing is supported.
 boolean supportsConvert()
          Indicates if the CONVERT function between SQL types is supported.
 boolean supportsConvert(int fromType, int toType)
          Indicates if CONVERT between the given SQL types is supported.
 boolean supportsCoreSQLGrammar()
          Indicates if the ODBC Core SQL grammar is supported.
 boolean supportsCorrelatedSubqueries()
          Indicates if the correlated subqueries are supported.
 boolean supportsDataDefinitionAndDataManipulationTransactions()
          Indicates if both data definition and data manipulation statements are supported within a transaction.
 boolean supportsDataManipulationTransactionsOnly()
          Indicates if data manipulation statements are supported within a transaction.
 boolean supportsDifferentTableCorrelationNames()
          Indicates if table correlation names are supported, and if so, are they restricted to be different from the names of the tables.
 boolean supportsExpressionsInOrderBy()
          Indicates if expressions in ORDER BY lists are supported.
 boolean supportsExtendedSQLGrammar()
          Indicates if the ODBC Extended SQL grammar is supported.
 boolean supportsFullOuterJoins()
          Indicates if full nested outer joins are supported.
 boolean supportsGetGeneratedKeys()
          Indicates if, after a statement is executed, auto-generated keys can be retrieved using the method Statement.getGeneratedKeys().
 boolean supportsGroupBy()
          Indicates if some form of the GROUP BY clause is supported.
 boolean supportsGroupByBeyondSelect()
          Indicates if a GROUP BY clause can add columns not in the SELECT provided it specifies all of the columns in the SELECT.
 boolean supportsGroupByUnrelated()
          Indicates if a GROUP BY clause can use columns not in the SELECT.
 boolean supportsIntegrityEnhancementFacility()
          Indicates if the SQL Integrity Enhancement Facility is supported.
 boolean supportsLikeEscapeClause()
          Indicates if the escape character in LIKE clauses is supported.
 boolean supportsLimitedOuterJoins()
          Indicates if there is limited support for outer joins.
 boolean supportsMinimumSQLGrammar()
          Indicates if the ODBC Minimum SQL grammar is supported.
 boolean supportsMixedCaseIdentifiers()
          Indicates if the database treats mixed case, unquoted SQL identifiers as case sensitive and stores them in mixed case.
 boolean supportsMixedCaseQuotedIdentifiers()
          Indicates if the database treats mixed case, quoted SQL identifiers as case sensitive and as a result stores them in mixed case.
 boolean supportsMultipleOpenResults()
          Indicates if multiple result sets can be returned from a CallableStatement simultaneously.
 boolean supportsMultipleResultSets()
          Indicates if multiple result sets from a single execute are supported.
 boolean supportsMultipleTransactions()
          Indicates if multiple transactions can be open at once (on different connections).
 boolean supportsNamedParameters()
          Indicates if using parameter names to specify parameters on callable statements are supported.
 boolean supportsNonNullableColumns()
          Indicates if columns can be defined as non-nullable.
 boolean supportsOpenCursorsAcrossCommit()
          Indicates if cursors can remain open across commits.
 boolean supportsOpenCursorsAcrossRollback()
          Indicates if cursors can remain open across rollback.
 boolean supportsOpenStatementsAcrossCommit()
          Indicates if statements can remain open across commits.
 boolean supportsOpenStatementsAcrossRollback()
          Indicates if statements can remain open across rollback.
 boolean supportsOrderByUnrelated()
          Indicates if an ORDER BY clause can use columns not in the SELECT.
 boolean supportsOuterJoins()
          Indicates if some form of outer join is supported.
 boolean supportsPositionedDelete()
          Indicates if positioned DELETE is supported.
 boolean supportsPositionedUpdate()
          Indicates if positioned UPDATE is supported.
 boolean supportsResultSetConcurrency(int resultSetType, int resultSetConcurrency)
          Indicates if the specified result set concurrency is supported for the specified result set type.
 boolean supportsResultSetHoldability(int resultSetHoldability)
          Indicates if a type of result set holdability is supported.
 boolean supportsResultSetType(int resultSetType)
          Indicates if the specified result set type is supported.
 boolean supportsSavepoints()
          Indicates if savepoints are supported.
 boolean supportsSchemasInDataManipulation()
          Indicates if a schema name can be used in a data manipulation statement.
 boolean supportsSchemasInIndexDefinitions()
          Indicates if a schema name can be used in an index definition statement.
 boolean supportsSchemasInPrivilegeDefinitions()
          Indicates if a schema name be can used in a privilege definition statement.
 boolean supportsSchemasInProcedureCalls()
          Indicates if a schema name be can used in a procedure call statement.
 boolean supportsSchemasInTableDefinitions()
          Indicates if a schema name can be used in a table definition statement.
 boolean supportsSelectForUpdate()
          Indicates if SELECT for UPDATE is supported.
 boolean supportsStatementPooling()
          Indicates if statement pooling is supported.
 boolean supportsStoredProcedures()
          Indicates if stored procedure calls using the stored procedure escape syntax are supported.
 boolean supportsSubqueriesInComparisons()
          Indicates if subqueries in comparisons are supported.
 boolean supportsSubqueriesInExists()
          Indicates if subqueries in EXISTS expressions are supported.
 boolean supportsSubqueriesInIns()
          Indicates if subqueries in IN expressions are supported.
 boolean supportsSubqueriesInQuantifieds()
          Indicates if subqueries in quantified expressions are supported.
 boolean supportsTableCorrelationNames()
          Indicates if table correlation names are supported.
 boolean supportsTransactionIsolationLevel(int transactionIsolationLevel)
          Indicates if the database supports the given transaction isolation level.
 boolean supportsTransactions()
          Indicates if transactions are supported.
 boolean supportsUnion()
          Indicates if SQL UNION is supported.
 boolean supportsUnionAll()
          Indicates if SQL UNION ALL is supported.
 String toString()
          Returns the name of the catalog.
 boolean updatesAreDetected(int resultSetType)
          Indicates if visible updates to a result set of the specified type can be detected by calling ResultSet.rowUpdated().
 boolean usesLocalFilePerTable()
          Indicates if the database uses a file for each table.
 boolean usesLocalFiles()
          Indicates if the database stores tables in a local file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.DatabaseMetaData
autoCommitFailureClosesAllResultSets, getRowIdLifetime, supportsStoredFunctionsUsingCallSyntax
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

sqlStateXOpen

public static final int sqlStateXOpen
See Also:
Constant Field Values

sqlStateSQL99

public static final int sqlStateSQL99
See Also:
Constant Field Values
Method Detail

allProceduresAreCallable

public boolean allProceduresAreCallable()
                                 throws SQLException
Indicates if all of the procedures returned by getProcedures() can be called by the current user.

Specified by:
allProceduresAreCallable in interface DatabaseMetaData
Returns:
Always false. This driver cannot determine if all of the procedures can be called by the current user.
Throws:
SQLException - This exception is never thrown.

allTablesAreSelectable

public boolean allTablesAreSelectable()
                               throws SQLException
Indicates if all of the tables returned by getTables() can be SELECTed by the current user.

Specified by:
allTablesAreSelectable in interface DatabaseMetaData
Returns:
Always false. This driver cannot determine if all of the tables returned by getTables() can be selected by the current user.
Throws:
SQLException - This exception is never thrown.

dataDefinitionCausesTransactionCommit

public boolean dataDefinitionCausesTransactionCommit()
                                              throws SQLException
Indicates if a data definition statement within a transaction can force the transaction to commit.

Specified by:
dataDefinitionCausesTransactionCommit in interface DatabaseMetaData
Returns:
Always false. A data definition statement within a transaction does not force the transaction to commit.
Throws:
SQLException - This exception is never thrown.

dataDefinitionIgnoredInTransactions

public boolean dataDefinitionIgnoredInTransactions()
                                            throws SQLException
Indicates if a data definition statement within a transaction is ignored.

Specified by:
dataDefinitionIgnoredInTransactions in interface DatabaseMetaData
Returns:
Always false. A data definition statement within a transaction is not ignored.
Throws:
SQLException - This exception is never thrown.

deletesAreDetected

public boolean deletesAreDetected(int resultSetType)
                           throws SQLException
Indicates if visible deletes to a result set of the specified type can be detected by calling ResultSet.rowDeleted(). If visible deletes cannot be detected, then rows are removed from the result set as they are deleted.

Specified by:
deletesAreDetected in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
Always false. Deletes can not be detected by calling ResultSet.rowDeleted().
Throws:
SQLException - If the result set type is not valid.

doesMaxRowSizeIncludeBlobs

public boolean doesMaxRowSizeIncludeBlobs()
                                   throws SQLException
Indicates if getMaxRowSize() includes blobs when computing the maximum length of a single row.

Specified by:
doesMaxRowSizeIncludeBlobs in interface DatabaseMetaData
Returns:
Always true. getMaxRowSize() does include blobs when computing the maximum length of a single row.
Throws:
SQLException - This exception is never thrown.

getAttributes

public ResultSet getAttributes(String catalog,
                               String schemaPattern,
                               String typeNamePattern,
                               String attributeNamePattern)
                        throws SQLException
Returns a ResultSet containing a description of type attributes available in a specified catalog. This method only applies to the attributes of a structured type. Distinct types are stored in the datatypes catalog, not the attributes catalog. Since DB2 for IBM i does not support structured types at this time, an empty ResultSet will always be returned for calls to this method.

Specified by:
getAttributes in interface DatabaseMetaData
Parameters:
catalog - The catalog name.
schemaPattern - The schema name pattern.
typeNamePattern - The type name pattern.
attributeNamePattern - The attribute name pattern.
Returns:
The empty ResultSet
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getBestRowIdentifier

public ResultSet getBestRowIdentifier(String catalog,
                                      String schema,
                                      String table,
                                      int scope,
                                      boolean nullable)
                               throws SQLException
Returns a description of a table's optimal set of columns that uniquely identifies a row.

Specified by:
getBestRowIdentifier in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified and a default SQL schema was not specified in the URL and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
scope - The scope of interest. Valid values are: bestRowTemporary and bestRowTransaction. bestRowSession is not allowed because it cannot be guaranteed that the row will remain valid for the session. If bestRowSession is specified, an empty result set is returned. If bestRowTransaction is specified, autocommit is false, and transaction is set to repeatable read, then results is returned; otherwise, an empty result set is returned.
nullable - The value indicating if columns that are nullable should be included.
Returns:
The ResultSet containing a table's optimal set of columns that uniquely identify a row.
Throws:
SQLException - If the connection is not open or an error occurs.

getCatalogs

public ResultSet getCatalogs()
                      throws SQLException
Returns the catalog name available in this database. This will return a ResultSet with a single row, whose value is the IBM i system name.

Specified by:
getCatalogs in interface DatabaseMetaData
Returns:
The ResultSet containing the IBM i system name.
Throws:
SQLException - If the connection is not open or an error occurs.

getCatalogSeparator

public String getCatalogSeparator()
                           throws SQLException
Returns the naming convention used when referring to tables. This depends on the naming convention specified in the connection properties.

Specified by:
getCatalogSeparator in interface DatabaseMetaData
Returns:
If using SQL naming convention, "." is returned. If using system naming convention, "/" is returned.
Throws:
SQLException - This exception is never thrown.

getCatalogTerm

public String getCatalogTerm()
                      throws SQLException
Returns the DB2 for IBM i SQL term for "catalog".

Specified by:
getCatalogTerm in interface DatabaseMetaData
Returns:
The term "System".
Throws:
SQLException - This exception is never thrown.

getColumnPrivileges

public ResultSet getColumnPrivileges(String catalog,
                                     String schema,
                                     String table,
                                     String columnPattern)
                              throws SQLException
Returns a description of the access rights for a table's columns.

Specified by:
getColumnPrivileges in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified and a default SQL schema was not specified in the URL and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
columnPattern - The column name pattern. If null is specified, no value is sent to the system and the system default of *all is used. If empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing access rights for a table's columns.
Throws:
SQLException - If the connection is not open or an error occurs.

getColumns

public ResultSet getColumns(String catalog,
                            String schemaPattern,
                            String tablePattern,
                            String columnPattern)
                     throws SQLException
Returns a description of the table's columns available in a catalog.

Specified by:
getColumns in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schemaPattern - The schema name pattern. If null is specified, no value is sent to the system and the system default of *USRLIBL is used. If empty string is specified, an empty result set is returned.
tablePattern - The table name pattern. If null is specified, no value is sent to the system and the system default of *ALL is used. If empty string is specified, an empty result set is returned.
columnPattern - The column name pattern. If null is specified, no value is sent to the system and the system default of *ALL is used. If empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the table's columns available in a catalog.
Throws:
SQLException - If the connection is not open or an error occurs.

getConnection

public Connection getConnection()
                         throws SQLException
Returns the connection for this metadata.

Specified by:
getConnection in interface DatabaseMetaData
Returns:
The connection for this metadata.
Throws:
SQLException - This exception is never thrown.

getCrossReference

public ResultSet getCrossReference(String primaryCatalog,
                                   String primarySchema,
                                   String primaryTable,
                                   String foreignCatalog,
                                   String foreignSchema,
                                   String foreignTable)
                            throws SQLException
Returns a description of the foreign key columns in the foreign key table that references the primary key columns of the primary key table. This is a description of how the primary table imports the foreign table's key.

Specified by:
getCrossReference in interface DatabaseMetaData
Parameters:
primaryCatalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
primarySchema - The name of the schema where the primary table is located. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified,a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set is returned.
primaryTable - The primary table name. If null or empty string is specified, an empty result set is returned.
foreignCatalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
foreignSchema - The name of the schema where the primary table is located. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified, a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set is returned.
foreignTable - The foreign table name. If null or empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the foreign key columns in the foreign key table that references the primary key columns of the primary key table.
Throws:
SQLException - If the connection is not open or an error occurs.

getDatabaseMajorVersion

public int getDatabaseMajorVersion()
Returns the major version number of the database.

Specified by:
getDatabaseMajorVersion in interface DatabaseMetaData
Returns:
The major version number.
Since:
Modification 5

getDatabaseMinorVersion

public int getDatabaseMinorVersion()
Returns the minor version number of the database.

Specified by:
getDatabaseMinorVersion in interface DatabaseMetaData
Returns:
The minor version number.
Since:
Modification 5

getDatabaseProductName

public String getDatabaseProductName()
                              throws SQLException
Returns the name of this database product.

Specified by:
getDatabaseProductName in interface DatabaseMetaData
Returns:
The database product name.
Throws:
SQLException - This exception is never thrown.

getDatabaseProductVersion

public String getDatabaseProductVersion()
                                 throws SQLException
Returns the version of this database product.

Specified by:
getDatabaseProductVersion in interface DatabaseMetaData
Returns:
The product version.
Throws:
SQLException - If the connection is not open or an error occurs.

getDefaultTransactionIsolation

public int getDefaultTransactionIsolation()
                                   throws SQLException
Returns the default transaction isolation level.

Specified by:
getDefaultTransactionIsolation in interface DatabaseMetaData
Returns:
The default transaction isolation level.
Throws:
SQLException - This exception is never thrown.

getDriverMajorVersion

public int getDriverMajorVersion()
Returns the major version number for this JDBC driver.

Specified by:
getDriverMajorVersion in interface DatabaseMetaData
Returns:
The major version number.

getDriverMinorVersion

public int getDriverMinorVersion()
Returns the minor version number for this JDBC driver.

Specified by:
getDriverMinorVersion in interface DatabaseMetaData
Returns:
The minor version number.

getDriverName

public String getDriverName()
                     throws SQLException
Returns the name of this JDBC driver.

Specified by:
getDriverName in interface DatabaseMetaData
Returns:
The driver name.
Throws:
SQLException - This exception is never thrown.

getDriverVersion

public String getDriverVersion()
                        throws SQLException
Returns the version of this JDBC driver.

Specified by:
getDriverVersion in interface DatabaseMetaData
Returns:
The driver version.
Throws:
SQLException - This exception is never thrown.

getExportedKeys

public ResultSet getExportedKeys(String catalog,
                                 String schema,
                                 String table)
                          throws SQLException
Returns a description of the foreign key columns that reference a table's primary key columns. This is the foreign keys exported by a table.

Specified by:
getExportedKeys in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified, a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the foreign key columns that reference a table's primary key columns.
Throws:
SQLException - If the connection is not open or an error occurs.

getExtraNameCharacters

public String getExtraNameCharacters()
                              throws SQLException
Returns all of the "extra" characters that can be used in unquoted identifier names (those beyond a-z, A-Z, 0-9, and _).

Specified by:
getExtraNameCharacters in interface DatabaseMetaData
Returns:
The String containing the "extra" characters.
Throws:
SQLException - This exception is never thrown.

getIdentifierQuoteString

public String getIdentifierQuoteString()
                                throws SQLException
Returns the string used to quote SQL identifiers.

Specified by:
getIdentifierQuoteString in interface DatabaseMetaData
Returns:
The quote string.
Throws:
SQLException - This exception is never thrown.

getImportedKeys

public ResultSet getImportedKeys(String catalog,
                                 String schema,
                                 String table)
                          throws SQLException
Returns a description of the primary key columns that are referenced by a table's foreign key columns. This is the primary keys imported by a table.

Specified by:
getImportedKeys in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified, a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
Returns:
The ResultSets containing the description of the primary key columns that are referenced by a table's foreign key columns.
Throws:
SQLException - If the connection is not open or an error occurs.

getIndexInfo

public ResultSet getIndexInfo(String catalog,
                              String schema,
                              String table,
                              boolean unique,
                              boolean approximate)
                       throws SQLException
Returns a description of a table's indexes and statistics.

Specified by:
getIndexInfo in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified, a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
unique - The value indicating if unique indexes should be returned. If true, only indexes for unique values is returned. If false, all indexes is returned.
approximate - The value indicating if the result is allowed to reflect approximate or out-of-date values. This value is ignored.
Returns:
The ResultSet containing the description of a table's indexes and statistics.
Throws:
SQLException - If the connection is not open or an error occurs.

getJDBCMajorVersion

public int getJDBCMajorVersion()
                        throws SQLException
Returns the JDBC major version number.

Specified by:
getJDBCMajorVersion in interface DatabaseMetaData
Returns:
The JDBC major version number.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getJDBCMinorVersion

public int getJDBCMinorVersion()
                        throws SQLException
Returns the JDBC minor version number.

Specified by:
getJDBCMinorVersion in interface DatabaseMetaData
Returns:
The JDBC minor version number.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getMaxBinaryLiteralLength

public int getMaxBinaryLiteralLength()
                              throws SQLException
Returns the maximum length for an inline binary literal.

Specified by:
getMaxBinaryLiteralLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxCatalogNameLength

public int getMaxCatalogNameLength()
                            throws SQLException
Returns the maximum length for a catalog name.

Specified by:
getMaxCatalogNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxCharLiteralLength

public int getMaxCharLiteralLength()
                            throws SQLException
Returns the maximum length for a character literal.

Specified by:
getMaxCharLiteralLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxColumnNameLength

public int getMaxColumnNameLength()
                           throws SQLException
Returns the maximum length for a column name.

Specified by:
getMaxColumnNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxColumnsInGroupBy

public int getMaxColumnsInGroupBy()
                           throws SQLException
Returns the maximum number of columns in a GROUP BY clause.

Specified by:
getMaxColumnsInGroupBy in interface DatabaseMetaData
Returns:
The maximum number of columns.
Throws:
SQLException - This exception is never thrown.

getMaxColumnsInIndex

public int getMaxColumnsInIndex()
                         throws SQLException
Returns the maximum number of columns allowed in an index.

Specified by:
getMaxColumnsInIndex in interface DatabaseMetaData
Returns:
The maximum number of columns.
Throws:
SQLException - This exception is never thrown.

getMaxColumnsInOrderBy

public int getMaxColumnsInOrderBy()
                           throws SQLException
Returns the maximum number of columns in an ORDER BY clause.

Specified by:
getMaxColumnsInOrderBy in interface DatabaseMetaData
Returns:
The maximum number of columns.
Throws:
SQLException - This exception is never thrown.

getMaxColumnsInSelect

public int getMaxColumnsInSelect()
                          throws SQLException
Returns the maximum number of columns in a SELECT list.

Specified by:
getMaxColumnsInSelect in interface DatabaseMetaData
Returns:
The maximum number of columns.
Throws:
SQLException - This exception is never thrown.

getMaxColumnsInTable

public int getMaxColumnsInTable()
                         throws SQLException
Returns the maximum number of columns in a table.

Specified by:
getMaxColumnsInTable in interface DatabaseMetaData
Returns:
The maximum number of columns.
Throws:
SQLException - This exception is never thrown.

getMaxConnections

public int getMaxConnections()
                      throws SQLException
Returns the number of active connections you can have at a time to this database.

Specified by:
getMaxConnections in interface DatabaseMetaData
Returns:
The maximum number of connections or 0 if no limit.
Throws:
SQLException - This exception is never thrown.

getMaxCursorNameLength

public int getMaxCursorNameLength()
                           throws SQLException
Returns the maximum cursor name length.

Specified by:
getMaxCursorNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxIndexLength

public int getMaxIndexLength()
                      throws SQLException
Returns the maximum length of an index.

Specified by:
getMaxIndexLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxProcedureNameLength

public int getMaxProcedureNameLength()
                              throws SQLException
Returns the maximum length of a procedure name.

Specified by:
getMaxProcedureNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxRowSize

public int getMaxRowSize()
                  throws SQLException
Returns the maximum length of a single row.

Specified by:
getMaxRowSize in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxSchemaNameLength

public int getMaxSchemaNameLength()
                           throws SQLException
Returns the maximum length allowed for a schema name.

Specified by:
getMaxSchemaNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxStatementLength

public int getMaxStatementLength()
                          throws SQLException
Returns the maximum length of an SQL statement.

Specified by:
getMaxStatementLength in interface DatabaseMetaData
Returns:
The maximum length.
Throws:
SQLException - This exception is never thrown.

getMaxStatements

public int getMaxStatements()
                     throws SQLException
Returns the number of active statements you can have open at one time.

Specified by:
getMaxStatements in interface DatabaseMetaData
Returns:
The maximum number of statements or 0 if no limit.
Throws:
SQLException - This exception is never thrown.

getMaxTableNameLength

public int getMaxTableNameLength()
                          throws SQLException
Returns the maximum length of a table name.

Specified by:
getMaxTableNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getMaxTablesInSelect

public int getMaxTablesInSelect()
                         throws SQLException
Returns the maximum number of tables in a SELECT.

Specified by:
getMaxTablesInSelect in interface DatabaseMetaData
Returns:
The maximum number of tables.
Throws:
SQLException - This exception is never thrown.

getMaxUserNameLength

public int getMaxUserNameLength()
                         throws SQLException
Returns the maximum length of a user name.

Specified by:
getMaxUserNameLength in interface DatabaseMetaData
Returns:
The maximum length (in bytes).
Throws:
SQLException - This exception is never thrown.

getNumericFunctions

public String getNumericFunctions()
                           throws SQLException
Returns the list of supported math functions.

Specified by:
getNumericFunctions in interface DatabaseMetaData
Returns:
The list of supported math functions, separated by commas.
Throws:
SQLException - This exception is never thrown.

getPrimaryKeys

public ResultSet getPrimaryKeys(String catalog,
                                String schema,
                                String table)
                         throws SQLException
Returns a description of the primary key columns.

Specified by:
getPrimaryKeys in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified, a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the primary key columns.
Throws:
SQLException - If the connection is not open or an error occurs.

getProcedureColumns

public ResultSet getProcedureColumns(String catalog,
                                     String schemaPattern,
                                     String procedurePattern,
                                     String columnPattern)
                              throws SQLException
Returns a description of a catalog's stored procedure parameters and result columns.

Specified by:
getProcedureColumns in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schemaPattern - The schema name pattern. If null is specified, it will not be included in the selection criteria. If empty string is specified, an empty result set is returned.
procedurePattern - The procedure name pattern. If null is specified, it will not be included in the selection criteria. If empty string is specified, an empty result set is returned.
columnPattern - The column name pattern. If null is specified, it will not be included in the selection criteria. If empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the catalog's stored procedure parameters and result columns.
Throws:
SQLException - If the connection is not open or an error occurs.

getProcedures

public ResultSet getProcedures(String catalog,
                               String schemaPattern,
                               String procedurePattern)
                        throws SQLException
Returns the description of the stored procedures available in a catalog.

Specified by:
getProcedures in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schemaPattern - The schema name pattern. If null is specified, it will not be included in the selection criteria. If empty string is specified, an empty result set is returned.
procedurePattern - The procedure name pattern. If null is specified, it will not be included in the selection criteria. If empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the stored procedures available in the catalog.
Throws:
SQLException - If the connection is not open or an error occurs.

getProcedureTerm

public String getProcedureTerm()
                        throws SQLException
Returns the DB2 for IBM i SQL term for "procedure".

Specified by:
getProcedureTerm in interface DatabaseMetaData
Returns:
The term for "procedure".
Throws:
SQLException - This exception is never thrown.

getResultSetHoldability

public int getResultSetHoldability()
                            throws SQLException
Retrieves the default holdability of this ResultSet object. Holdability is whether ResultSet objects are kept open when the statement is committed.

Specified by:
getResultSetHoldability in interface DatabaseMetaData
Returns:
Always ResultSet.HOLD_CURSORS_OVER_COMMIT.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getSchemas

public ResultSet getSchemas()
                     throws SQLException
Returns the schema names available in this database. This will return a ResultSet with a list of all the libraries.

Specified by:
getSchemas in interface DatabaseMetaData
Returns:
The ResultSet containing the list of all the libraries.
Throws:
SQLException - If the connection is not open or an error occurs.

getSchemaTerm

public String getSchemaTerm()
                     throws SQLException
Returns the DB2 for IBM i SQL term for "schema".

Specified by:
getSchemaTerm in interface DatabaseMetaData
Returns:
The term for schema.
Throws:
SQLException - This exception is never thrown.

getSearchStringEscape

public String getSearchStringEscape()
                             throws SQLException
Returns the string used to escape wildcard characters. This is the string that can be used to escape '_' or '%' in string patterns.

Specified by:
getSearchStringEscape in interface DatabaseMetaData
Returns:
The escape string.
Throws:
SQLException - This exception is never thrown.

getSQLKeywords

public String getSQLKeywords()
                      throws SQLException
Returns the list of all of the database's SQL keywords that are not also SQL92 keywords.

Specified by:
getSQLKeywords in interface DatabaseMetaData
Returns:
The list of SQL keywords, separated by commas.
Throws:
SQLException - This exception is never thrown.

getSQLStateType

public int getSQLStateType()
                    throws SQLException
Indicates whether the SQLSTATEs returned by SQLException.getSQLState is X/Open SQL CLI or SQL99.

Specified by:
getSQLStateType in interface DatabaseMetaData
Returns:
Always sqlStateSQL99.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getStringFunctions

public String getStringFunctions()
                          throws SQLException
Returns the list of supported string functions.

Specified by:
getStringFunctions in interface DatabaseMetaData
Returns:
The list of supported string functions, separated by commas.
Throws:
SQLException - This exception is never thrown.

getSuperTables

public ResultSet getSuperTables(String catalog,
                                String schemaPattern,
                                String typeNamePattern)
                         throws SQLException
Returns a ResultSet containing descriptions of the table hierarchies in a schema. This method only applies to the attributes of a structured type. Distinct types are stored in the datatypes catalog, not the attributes catalog. Since DB2 for IBM i does not support structured types at this time, an empty ResultSet will always be returned for calls to this method.

Specified by:
getSuperTables in interface DatabaseMetaData
Parameters:
catalog - The catalog name.
schemaPattern - The schema name pattern.
typeNamePattern - The type name pattern.
Returns:
The empty ResultSet
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getSuperTypes

public ResultSet getSuperTypes(String catalog,
                               String schemaPattern,
                               String typeNamePattern)
                        throws SQLException
Returns a ResultSet containing descriptions of user-defined type hierarchies in a schema. This method only applies to the attributes of a structured type. Distinct types are stored in the datatypes catalog, not the attributes catalog. Since DB2 for IBM i does not support structured types at this time, an empty ResultSet will always be returned for calls to this method.

Specified by:
getSuperTypes in interface DatabaseMetaData
Parameters:
catalog - The catalog name.
schemaPattern - The schema name pattern.
typeNamePattern - The type name pattern.
Returns:
The empty result set
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

getSystemFunctions

public String getSystemFunctions()
                          throws SQLException
Returns the list of supported system functions.

Specified by:
getSystemFunctions in interface DatabaseMetaData
Returns:
The list of supported system functions, separated by commas.
Throws:
SQLException - This exception is never thrown.

getTablePrivileges

public ResultSet getTablePrivileges(String catalog,
                                    String schemaPattern,
                                    String tablePattern)
                             throws SQLException
Returns the description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in a table.

Specified by:
getTablePrivileges in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schemaPattern - The schema name pattern. If null is specified, no value is sent to the system and the system default of *USRLIBL is used. If empty string is specified, an empty result set is returned.
tablePattern - The table name. If null is specified, no value is sent to the system and the system default of *ALL is used. If empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the access rights for each table available in the catalog.
Throws:
SQLException - If the connection is not open or an error occurs.

getTables

public ResultSet getTables(String catalog,
                           String schemaPattern,
                           String tablePattern,
                           String[] tableTypes)
                    throws SQLException
Returns the description of the tables available in a catalog.

Specified by:
getTables in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schemaPattern - The schema name pattern. If null is specified, no value is sent to the system and the system default of *USRLIBL is used. If empty string is specified, an empty result set is returned.
tablePattern - The table name pattern. If null is specified, no value is sent to the system and the system default of *ALL is used. If empty string is specified, an empty result set is returned.
tableTypes - The list of table types to include, or null to include all table types. Valid types are: TABLE, VIEW, SYSTEM TABLE, MATERIALIZED QUERY TABLE, and ALIAS.
Returns:
The ResultSet containing the description of the tables available in the catalog.
Throws:
SQLException - If the connection is not open or an error occurs.

getTableTypes

public ResultSet getTableTypes()
                        throws SQLException
Returns the table types available in this database.

Specified by:
getTableTypes in interface DatabaseMetaData
Returns:
The ResultSet containing the table types available in this database.
Throws:
SQLException - If the connection is not open or an error occurs.

getTimeDateFunctions

public String getTimeDateFunctions()
                            throws SQLException
Returns the list of supported time and date functions.

Specified by:
getTimeDateFunctions in interface DatabaseMetaData
Returns:
The list of supported time and data functions, separated by commas.
Throws:
SQLException - This exception is never thrown.

getTypeInfo

public ResultSet getTypeInfo()
                      throws SQLException
Returns a description of all of the standard SQL types supported by this database.

Specified by:
getTypeInfo in interface DatabaseMetaData
Returns:
The ResultSet containing the description of all the standard SQL types supported by this database.
Throws:
SQLException - This exception is never thrown.

getUDTs

public ResultSet getUDTs(String catalog,
                         String schemaPattern,
                         String typeNamePattern,
                         int[] types)
                  throws SQLException
Returns the description of the user-defined types available in a catalog.

Specified by:
getUDTs in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schemaPattern - The schema name pattern. If null is specified, no value is sent to the system and the system default of *USRLIBL is used. If empty string is specified, an empty result set is returned.
typeNamePattern - The type name pattern. If null is specified, no value is sent to the system and the system default of *ALL is used. If empty string is specified, an empty result set is returned.
types - The list of user-defined types to include, or null to include all user-defined types. Valid types are: JAVA_OBJECT, STRUCT, and DISTINCT.
Returns:
The ResultSet containing the description of the user-defined available in the catalog.
Throws:
SQLException - If the connection is not open or an error occurs.

getURL

public String getURL()
              throws SQLException
Returns the URL for this database.

Specified by:
getURL in interface DatabaseMetaData
Returns:
The URL for this database.
Throws:
SQLException - If the connection is not open or an error occurs.

getUserName

public String getUserName()
                   throws SQLException
Returns the current user name as known to the database.

Specified by:
getUserName in interface DatabaseMetaData
Returns:
The current user name as known to the database.
Throws:
SQLException - If the connection is not open or an error occurs.

getVersionColumns

public ResultSet getVersionColumns(String catalog,
                                   String schema,
                                   String table)
                            throws SQLException
Returns a description of a table's columns that are automatically updated when any value in a row is updated.

Specified by:
getVersionColumns in interface DatabaseMetaData
Parameters:
catalog - The catalog name. If null is specified, this parameter is ignored. If empty string is specified, an empty result set is returned.
schema - The schema name. If null is specified, the default SQL schema specified in the URL is used. If null is specified and a default SQL schema was not specified in the URL, the first library specified in the libraries properties file is used. If null is specified, a default SQL schema was not specified in the URL, and a library was not specified in the libraries properties file, QGPL is used. If empty string is specified, an empty result set will be returned.
table - The table name. If null or empty string is specified, an empty result set is returned.
Returns:
The ResultSet containing the description of the table's columns that are automatically updated when any value in a row is updated.
Throws:
SQLException - If the connection is not open or an error occurs.

insertsAreDetected

public boolean insertsAreDetected(int resultSetType)
                           throws SQLException
Indicates if visible inserts to a result set of the specified type can be detected by calling ResultSet.rowInserted().

Specified by:
insertsAreDetected in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
Always false. Inserts can not be detected by calling ResultSet.rowInserted().
Throws:
SQLException - If the result set type is not valid.

isCatalogAtStart

public boolean isCatalogAtStart()
                         throws SQLException
Indicates if a catalog appears at the start or the end of a qualified name.

Specified by:
isCatalogAtStart in interface DatabaseMetaData
Returns:
Always true. A catalog appears at the start of a qualified name.
Throws:
SQLException - This exception is never thrown.

isReadOnly

public boolean isReadOnly()
                   throws SQLException
Indicates if the database is in read-only mode.

Specified by:
isReadOnly in interface DatabaseMetaData
Returns:
true if in read-only mode; false otherwise.
Throws:
SQLException - If the connection is not open or an error occurs.

locatorsUpdateCopy

public boolean locatorsUpdateCopy()
                           throws SQLException
Indicates if updateable LOB methods update a copy of the LOB or if updates are made directly to the LOB. True is returned if updateable lob methods update a copy of the LOB, false is returned if updates are made directly to the LOB.

Specified by:
locatorsUpdateCopy in interface DatabaseMetaData
Returns:
Always true. Updateable lob methods update a copy of the LOB. ResultSet.updateRow() must be called to update the LOB in the DB2 for IBM i database.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

nullPlusNonNullIsNull

public boolean nullPlusNonNullIsNull()
                              throws SQLException
Indicates if concatenations between null and non-null values are null.

Specified by:
nullPlusNonNullIsNull in interface DatabaseMetaData
Returns:
Always true. Concatenations between null and non-null values are null.
Throws:
SQLException - This exception is never thrown.

nullsAreSortedAtEnd

public boolean nullsAreSortedAtEnd()
                            throws SQLException
Indicates if null values are sorted at the end regardless of sort order.

Specified by:
nullsAreSortedAtEnd in interface DatabaseMetaData
Returns:
Always false. Null values are not sorted at the end regardless of sort order.
Throws:
SQLException - This exception is never thrown.

nullsAreSortedAtStart

public boolean nullsAreSortedAtStart()
                              throws SQLException
Indicates if null values are sorted at the start regardless of sort order.

Specified by:
nullsAreSortedAtStart in interface DatabaseMetaData
Returns:
Always false. Null values are not sorted at the start regardless of sort order.
Throws:
SQLException - This exception is never thrown.

nullsAreSortedHigh

public boolean nullsAreSortedHigh()
                           throws SQLException
Indicates if null values are sorted high.

Specified by:
nullsAreSortedHigh in interface DatabaseMetaData
Returns:
Always true. Null values are sorted high.
Throws:
SQLException - This exception is never thrown.

nullsAreSortedLow

public boolean nullsAreSortedLow()
                          throws SQLException
Indicates if null values are sorted low.

Specified by:
nullsAreSortedLow in interface DatabaseMetaData
Returns:
Always false. Null values are not sorted low.
Throws:
SQLException - This exception is never thrown.

othersDeletesAreVisible

public boolean othersDeletesAreVisible(int resultSetType)
                                throws SQLException
Indicates if deletes made by others are visible.

Specified by:
othersDeletesAreVisible in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true if deletes made by others are visible; false otherwise.
Throws:
SQLException - If the result set type is not valid.

othersInsertsAreVisible

public boolean othersInsertsAreVisible(int resultSetType)
                                throws SQLException
Indicates if inserts made by others are visible.

Specified by:
othersInsertsAreVisible in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true if inserts made by others are visible; false otherwise.
Throws:
SQLException - If the result set type is not valid.

othersUpdatesAreVisible

public boolean othersUpdatesAreVisible(int resultSetType)
                                throws SQLException
Indicates if updates made by others are visible.

Specified by:
othersUpdatesAreVisible in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true if updates made by others are visible; false otherwise.
Throws:
SQLException - If the result set type is not valid.

ownDeletesAreVisible

public boolean ownDeletesAreVisible(int resultSetType)
                             throws SQLException
Indicates if a result set's own deletes are visible.

Specified by:
ownDeletesAreVisible in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true if the result set's own deletes are visible; false otherwise.
Throws:
SQLException - If the result set type is not valid.

ownInsertsAreVisible

public boolean ownInsertsAreVisible(int resultSetType)
                             throws SQLException
Indicates if a result set's own inserts are visible.

Specified by:
ownInsertsAreVisible in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true if the result set's own inserts are visible; false otherwise.
Throws:
SQLException - If the result set type is not valid.

ownUpdatesAreVisible

public boolean ownUpdatesAreVisible(int resultSetType)
                             throws SQLException
Indicates if a result set's own updates are visible.

Specified by:
ownUpdatesAreVisible in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true if the result set's own updates are visible; false otherwise.
Throws:
SQLException - If the result set type is not valid.

storesLowerCaseIdentifiers

public boolean storesLowerCaseIdentifiers()
                                   throws SQLException
Indicates if the database treats mixed case, unquoted SQL identifiers as case insensitive and stores them in lowercase.

Specified by:
storesLowerCaseIdentifiers in interface DatabaseMetaData
Returns:
Always false. The database does not treat mixed case, unquoted SQL identifiers as case insensitive and store them in lowercase.
Throws:
SQLException - This exception is never thrown.

storesLowerCaseQuotedIdentifiers

public boolean storesLowerCaseQuotedIdentifiers()
                                         throws SQLException
Indicates if the database treats mixed case, quoted SQL identifiers as case insensitive and stores them in lowercase.

Specified by:
storesLowerCaseQuotedIdentifiers in interface DatabaseMetaData
Returns:
Always false. The database does not treat mixed case, quoted SQL identifiers as case insensitive and store them in lowercase.
Throws:
SQLException - This exception is never thrown.

storesMixedCaseIdentifiers

public boolean storesMixedCaseIdentifiers()
                                   throws SQLException
Indicates if the database treats mixed case, unquoted SQL identifiers as case insensitive and stores them in mixed case.

Specified by:
storesMixedCaseIdentifiers in interface DatabaseMetaData
Returns:
Always false. The database does not treat mixed case, unquoted SQL identifiers as case insensitive and store them in mixed case.
Throws:
SQLException - This exception is never thrown.

storesMixedCaseQuotedIdentifiers

public boolean storesMixedCaseQuotedIdentifiers()
                                         throws SQLException
Indicates if the database treats mixed case, quoted SQL identifiers as case insensitive and stores them in mixed case.

Specified by:
storesMixedCaseQuotedIdentifiers in interface DatabaseMetaData
Returns:
Always false. The database does not treat mixed case, quoted SQL identifiers as case insensitive and store them in mixed case.
Throws:
SQLException - This exception is never thrown.

storesUpperCaseIdentifiers

public boolean storesUpperCaseIdentifiers()
                                   throws SQLException
Indicates if the database treats mixed case, unquoted SQL identifiers as case insensitive and stores them in uppercase.

Specified by:
storesUpperCaseIdentifiers in interface DatabaseMetaData
Returns:
Always true. The database does treat mixed case, unquoted SQL identifiers as case insensitive and store them in uppercase.
Throws:
SQLException - This exception is never thrown.

storesUpperCaseQuotedIdentifiers

public boolean storesUpperCaseQuotedIdentifiers()
                                         throws SQLException
Indicates if the database treats mixed case, quoted SQL identifiers as case insensitive and stores them in uppercase.

Specified by:
storesUpperCaseQuotedIdentifiers in interface DatabaseMetaData
Returns:
Always false. The database does not treat mixed case, quoted SQL identifiers as case insensitive and store them in uppercase.
Throws:
SQLException - This exception is never thrown.

supportsAlterTableWithAddColumn

public boolean supportsAlterTableWithAddColumn()
                                        throws SQLException
Indicates if ALTER TABLE with ADD COLUMN is supported.

Specified by:
supportsAlterTableWithAddColumn in interface DatabaseMetaData
Returns:
Always true. ALTER TABLE with ADD COLUMN is supported.
Throws:
SQLException - This exception is never thrown.

supportsAlterTableWithDropColumn

public boolean supportsAlterTableWithDropColumn()
                                         throws SQLException
Indicates if ALTER TABLE with DROP COLUMN is supported.

Specified by:
supportsAlterTableWithDropColumn in interface DatabaseMetaData
Returns:
Always true. ALTER TABLE with DROP COLUMN is not supported.
Throws:
SQLException - This exception is never thrown.

supportsANSI92EntryLevelSQL

public boolean supportsANSI92EntryLevelSQL()
                                    throws SQLException
Indicates if the ANSI92 entry-level SQL grammar is supported.

Specified by:
supportsANSI92EntryLevelSQL in interface DatabaseMetaData
Returns:
Always true. The ANSI92 entry-level SQL grammar is supported.
Throws:
SQLException - This exception is never thrown.

supportsANSI92FullSQL

public boolean supportsANSI92FullSQL()
                              throws SQLException
Indicates if the ANSI92, full SQL grammar is supported.

Specified by:
supportsANSI92FullSQL in interface DatabaseMetaData
Returns:
Always false. ANSI92, full SQL grammar is not supported.
Throws:
SQLException - This exception is never thrown.

supportsANSI92IntermediateSQL

public boolean supportsANSI92IntermediateSQL()
                                      throws SQLException
Indicates if the ANSI92 intermediate-level SQL grammar is supported.

Specified by:
supportsANSI92IntermediateSQL in interface DatabaseMetaData
Returns:
Always false. ANSI92 intermediate-level SQL grammar is not supported.
Throws:
SQLException - This exception is never thrown.

supportsBatchUpdates

public boolean supportsBatchUpdates()
                             throws SQLException
Indicates if the batch updates are supported.

Specified by:
supportsBatchUpdates in interface DatabaseMetaData
Returns:
Always true. Batch updates are supported.
Throws:
SQLException - This exception is never thrown.

supportsCatalogsInDataManipulation

public boolean supportsCatalogsInDataManipulation()
                                           throws SQLException
Indicates if a catalog name can be used in a data manipulation statement.

Specified by:
supportsCatalogsInDataManipulation in interface DatabaseMetaData
Returns:
Always false. A catalog name can not be used in a data manipulation statement.
Throws:
SQLException - This exception is never thrown.

supportsCatalogsInIndexDefinitions

public boolean supportsCatalogsInIndexDefinitions()
                                           throws SQLException
Indicates if a catalog name can be used in an index definition statement.

Specified by:
supportsCatalogsInIndexDefinitions in interface DatabaseMetaData
Returns:
Always false. A catalog name can not be used in an index definition statement.
Throws:
SQLException - This exception is never thrown.

supportsCatalogsInPrivilegeDefinitions

public boolean supportsCatalogsInPrivilegeDefinitions()
                                               throws SQLException
Indicates if a catalog name can be used in a privilege definition statement.

Specified by:
supportsCatalogsInPrivilegeDefinitions in interface DatabaseMetaData
Returns:
Always false. A catalog name can not be used in a privilege definition statement.
Throws:
SQLException - This exception is never thrown.

supportsCatalogsInProcedureCalls

public boolean supportsCatalogsInProcedureCalls()
                                         throws SQLException
Indicates if a catalog name can be used in a procedure call statement.

Specified by:
supportsCatalogsInProcedureCalls in interface DatabaseMetaData
Returns:
Always false. A catalog name can not be used in a procedure call statement.
Throws:
SQLException - This exception is never thrown.

supportsCatalogsInTableDefinitions

public boolean supportsCatalogsInTableDefinitions()
                                           throws SQLException
Indicates if a catalog name can be used in a table definition statement.

Specified by:
supportsCatalogsInTableDefinitions in interface DatabaseMetaData
Returns:
Always false. A catalog name can not be used in a table definition statement.
Throws:
SQLException - This exception is never thrown.

supportsColumnAliasing

public boolean supportsColumnAliasing()
                               throws SQLException
Indicates if column aliasing is supported. Column aliasing means that the SQL AS clause can be used to provide names for computed columns or to provide alias names for column as required.

Specified by:
supportsColumnAliasing in interface DatabaseMetaData
Returns:
Always true. Column aliasing is supported.
Throws:
SQLException - This exception is never thrown.

supportsConvert

public boolean supportsConvert()
                        throws SQLException
Indicates if the CONVERT function between SQL types is supported.

Specified by:
supportsConvert in interface DatabaseMetaData
Returns:
true if the CONVERT function between SQL types is supported; false otherwise.
Throws:
SQLException - This exception is never thrown.

supportsConvert

public boolean supportsConvert(int fromType,
                               int toType)
                        throws SQLException
Indicates if CONVERT between the given SQL types is supported.

Specified by:
supportsConvert in interface DatabaseMetaData
Parameters:
fromType - The SQL type code defined in java.sql.Types.
toType - The SQL type code defined in java.sql.Types.
Returns:
true if CONVERT between the given SQL types is supported; false otherwise.
Throws:
SQLException - This exception is never thrown.

supportsCoreSQLGrammar

public boolean supportsCoreSQLGrammar()
                               throws SQLException
Indicates if the ODBC Core SQL grammar is supported.

Specified by:
supportsCoreSQLGrammar in interface DatabaseMetaData
Returns:
Always true. The ODBC Core SQL grammar is supported.
Throws:
SQLException - This exception is never thrown.

supportsCorrelatedSubqueries

public boolean supportsCorrelatedSubqueries()
                                     throws SQLException
Indicates if the correlated subqueries are supported.

Specified by:
supportsCorrelatedSubqueries in interface DatabaseMetaData
Returns:
Always true. Correlated subqueries are supported.
Throws:
SQLException - This exception is never thrown.

supportsDataDefinitionAndDataManipulationTransactions

public boolean supportsDataDefinitionAndDataManipulationTransactions()
                                                              throws SQLException
Indicates if both data definition and data manipulation statements are supported within a transaction.

Specified by:
supportsDataDefinitionAndDataManipulationTransactions in interface DatabaseMetaData
Returns:
Always true. Data definition and data manipulation statements are both supported within a transaction.
Throws:
SQLException - This exception is never thrown.

supportsDataManipulationTransactionsOnly

public boolean supportsDataManipulationTransactionsOnly()
                                                 throws SQLException
Indicates if data manipulation statements are supported within a transaction.

Specified by:
supportsDataManipulationTransactionsOnly in interface DatabaseMetaData
Returns:
Always false. Data manipulation statements are not supported within a transaction.
Throws:
SQLException - This exception is never thrown.

supportsDifferentTableCorrelationNames

public boolean supportsDifferentTableCorrelationNames()
                                               throws SQLException
Indicates if table correlation names are supported, and if so, are they restricted to be different from the names of the tables.

Specified by:
supportsDifferentTableCorrelationNames in interface DatabaseMetaData
Returns:
Always false. Table correlation names are not restricted to be different from the names of the tables.
Throws:
SQLException - This exception is never thrown.

supportsExpressionsInOrderBy

public boolean supportsExpressionsInOrderBy()
                                     throws SQLException
Indicates if expressions in ORDER BY lists are supported.

Specified by:
supportsExpressionsInOrderBy in interface DatabaseMetaData
Returns:
Always false. Expression in ORDER BY lists are not supported.
Throws:
SQLException - This exception is never thrown.

supportsExtendedSQLGrammar

public boolean supportsExtendedSQLGrammar()
                                   throws SQLException
Indicates if the ODBC Extended SQL grammar is supported.

Specified by:
supportsExtendedSQLGrammar in interface DatabaseMetaData
Returns:
Always false. The ODBC Extended SQL grammar is not supported.
Throws:
SQLException - This exception is never thrown.

supportsFullOuterJoins

public boolean supportsFullOuterJoins()
                               throws SQLException
Indicates if full nested outer joins are supported.

Specified by:
supportsFullOuterJoins in interface DatabaseMetaData
Returns:
Always false. Full nested outer joins are not supported.
Throws:
SQLException - This exception is never thrown.

supportsGetGeneratedKeys

public boolean supportsGetGeneratedKeys()
                                 throws SQLException
Indicates if, after a statement is executed, auto-generated keys can be retrieved using the method Statement.getGeneratedKeys().

Specified by:
supportsGetGeneratedKeys in interface DatabaseMetaData
Returns:
True if the user is connecting to a system running OS/400 V5R2 or IBM i, otherwise false. Auto-generated keys are supported only if connecting to a system running OS/400 V5R2 or IBM i.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

supportsGroupBy

public boolean supportsGroupBy()
                        throws SQLException
Indicates if some form of the GROUP BY clause is supported.

Specified by:
supportsGroupBy in interface DatabaseMetaData
Returns:
Always true. Some form of GROUP BY clause is supported.
Throws:
SQLException - This exception is never thrown.

supportsGroupByBeyondSelect

public boolean supportsGroupByBeyondSelect()
                                    throws SQLException
Indicates if a GROUP BY clause can add columns not in the SELECT provided it specifies all of the columns in the SELECT.

Specified by:
supportsGroupByBeyondSelect in interface DatabaseMetaData
Returns:
Always true. A GROUP BY clause can add columns not in the SELECT provided it specifies all of the columns in the SELECT.
Throws:
SQLException - This exception is never thrown.

supportsGroupByUnrelated

public boolean supportsGroupByUnrelated()
                                 throws SQLException
Indicates if a GROUP BY clause can use columns not in the SELECT.

Specified by:
supportsGroupByUnrelated in interface DatabaseMetaData
Returns:
Always true. A GROUP BY clause can use columns not in the SELECT.
Throws:
SQLException - This exception is never thrown.

supportsIntegrityEnhancementFacility

public boolean supportsIntegrityEnhancementFacility()
                                             throws SQLException
Indicates if the SQL Integrity Enhancement Facility is supported.

Specified by:
supportsIntegrityEnhancementFacility in interface DatabaseMetaData
Returns:
Always false. The SQL Integrity Enhancement Facility is not supported.
Throws:
SQLException - This exception is never thrown.

supportsLikeEscapeClause

public boolean supportsLikeEscapeClause()
                                 throws SQLException
Indicates if the escape character in LIKE clauses is supported.

Specified by:
supportsLikeEscapeClause in interface DatabaseMetaData
Returns:
Always true. The escape character in LIKE clauses is supported.
Throws:
SQLException - This exception is never thrown.

supportsLimitedOuterJoins

public boolean supportsLimitedOuterJoins()
                                  throws SQLException
Indicates if there is limited support for outer joins.

Specified by:
supportsLimitedOuterJoins in interface DatabaseMetaData
Returns:
Always true. There is limited support for outer joins.
Throws:
SQLException - This exception is never thrown.

supportsMinimumSQLGrammar

public boolean supportsMinimumSQLGrammar()
                                  throws SQLException
Indicates if the ODBC Minimum SQL grammar is supported.

Specified by:
supportsMinimumSQLGrammar in interface DatabaseMetaData
Returns:
Always true. The ODBC Minimum SQL grammar is supported.
Throws:
SQLException - This exception is never thrown.

supportsMixedCaseIdentifiers

public boolean supportsMixedCaseIdentifiers()
                                     throws SQLException
Indicates if the database treats mixed case, unquoted SQL identifiers as case sensitive and stores them in mixed case.

Specified by:
supportsMixedCaseIdentifiers in interface DatabaseMetaData
Returns:
Always false. The database does not treat mixed case, unquoted SQL identifiers as case sensitive and as a result store them in mixed case.
Throws:
SQLException - This exception is never thrown.

supportsMixedCaseQuotedIdentifiers

public boolean supportsMixedCaseQuotedIdentifiers()
                                           throws SQLException
Indicates if the database treats mixed case, quoted SQL identifiers as case sensitive and as a result stores them in mixed case.

Specified by:
supportsMixedCaseQuotedIdentifiers in interface DatabaseMetaData
Returns:
Always true. The database does treat mixed case, quoted SQL identifiers as case sensitive and stores them in mixed case.
Throws:
SQLException - This exception is never thrown.

supportsMultipleOpenResults

public boolean supportsMultipleOpenResults()
                                    throws SQLException
Indicates if multiple result sets can be returned from a CallableStatement simultaneously.

Specified by:
supportsMultipleOpenResults in interface DatabaseMetaData
Returns:
Always false. Multiple open result sets from a single execute are not supported by the Toolbox driver.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

supportsMultipleResultSets

public boolean supportsMultipleResultSets()
                                   throws SQLException
Indicates if multiple result sets from a single execute are supported.

Specified by:
supportsMultipleResultSets in interface DatabaseMetaData
Returns:
Always true. Multiple result sets from a single execute are supported.
Throws:
SQLException - This exception is never thrown.

supportsMultipleTransactions

public boolean supportsMultipleTransactions()
                                     throws SQLException
Indicates if multiple transactions can be open at once (on different connections).

Specified by:
supportsMultipleTransactions in interface DatabaseMetaData
Returns:
Always true. Multiple transactions can be open at once on different connections.
Throws:
SQLException - This exception is never thrown.

supportsNamedParameters

public boolean supportsNamedParameters()
                                throws SQLException
Indicates if using parameter names to specify parameters on callable statements are supported.

Specified by:
supportsNamedParameters in interface DatabaseMetaData
Returns:
Always true. An application can use parameter names to specify parameters on callable statements.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

supportsNonNullableColumns

public boolean supportsNonNullableColumns()
                                   throws SQLException
Indicates if columns can be defined as non-nullable.

Specified by:
supportsNonNullableColumns in interface DatabaseMetaData
Returns:
Always true. Columns can be defined as non-nullable.
Throws:
SQLException - This exception is never thrown.

supportsOpenCursorsAcrossCommit

public boolean supportsOpenCursorsAcrossCommit()
                                        throws SQLException
Indicates if cursors can remain open across commits.

Specified by:
supportsOpenCursorsAcrossCommit in interface DatabaseMetaData
Returns:
Always true. Cursors can remain open across commits.
Throws:
SQLException - This exception is never thrown.

supportsOpenCursorsAcrossRollback

public boolean supportsOpenCursorsAcrossRollback()
                                          throws SQLException
Indicates if cursors can remain open across rollback.

Specified by:
supportsOpenCursorsAcrossRollback in interface DatabaseMetaData
Returns:
Always true. Cursors can remain open across rollback.
Throws:
SQLException - This exception is never thrown.

supportsOpenStatementsAcrossCommit

public boolean supportsOpenStatementsAcrossCommit()
                                           throws SQLException
Indicates if statements can remain open across commits.

Specified by:
supportsOpenStatementsAcrossCommit in interface DatabaseMetaData
Returns:
Always true. Statements can remain open across commits.
Throws:
SQLException - This exception is never thrown.

supportsOpenStatementsAcrossRollback

public boolean supportsOpenStatementsAcrossRollback()
                                             throws SQLException
Indicates if statements can remain open across rollback.

Specified by:
supportsOpenStatementsAcrossRollback in interface DatabaseMetaData
Returns:
Always true. Statements can remain open across rollback.
Throws:
SQLException - This exception is never thrown.

supportsOrderByUnrelated

public boolean supportsOrderByUnrelated()
                                 throws SQLException
Indicates if an ORDER BY clause can use columns not in the SELECT.

Specified by:
supportsOrderByUnrelated in interface DatabaseMetaData
Returns:
Always false. ORDER BY cannot use columns not in the SELECT.
Throws:
SQLException - This exception is never thrown.

supportsOuterJoins

public boolean supportsOuterJoins()
                           throws SQLException
Indicates if some form of outer join is supported.

Specified by:
supportsOuterJoins in interface DatabaseMetaData
Returns:
Always true. Some form of outer join is supported.
Throws:
SQLException - This exception is never thrown.

supportsPositionedDelete

public boolean supportsPositionedDelete()
                                 throws SQLException
Indicates if positioned DELETE is supported.

Specified by:
supportsPositionedDelete in interface DatabaseMetaData
Returns:
Always true. Positioned DELETE is supported.
Throws:
SQLException - This exception is never thrown.

supportsPositionedUpdate

public boolean supportsPositionedUpdate()
                                 throws SQLException
Indicates if positioned UPDATE is supported.

Specified by:
supportsPositionedUpdate in interface DatabaseMetaData
Returns:
Always true. Positioned UPDATE is supported.
Throws:
SQLException - This exception is never thrown.

supportsResultSetConcurrency

public boolean supportsResultSetConcurrency(int resultSetType,
                                            int resultSetConcurrency)
                                     throws SQLException
Indicates if the specified result set concurrency is supported for the specified result set type.

This chart describes the combinations of result set concurrency and type that this driver supports:


CONCUR_READ_ONLYCONCUR_UPDATABLE
TYPE_FORWARD_ONLYYesYes
TYPE_SCROLL_INSENSITIVEYesNo
TYPE_SCROLL_SENSITIVEYesYes

Specified by:
supportsResultSetConcurrency in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Valid values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency - The result set concurrency. Valid values are:
  • ResultSet.CONCUR_READ_ONLY
  • ResultSet.CONCUR_UPDATABLE
Returns:
true if the specified result set concurrency is supported for the specified result set type; false otherwise.
Throws:
SQLException - If the result set type or result set concurrency is not valid.

supportsResultSetHoldability

public boolean supportsResultSetHoldability(int resultSetHoldability)
                                     throws SQLException
Indicates if a type of result set holdability is supported. The two types are ResultSet.HOLD_CURSORS_OVER_COMMIT and ResultSet.CLOSE_CURSORS_AT_COMMIT.

Specified by:
supportsResultSetHoldability in interface DatabaseMetaData
Returns:
True if the user is connecting to a system running OS/400 V5R2 or IBM i, otherwise false. Both types of result set holidability are supported if connecting to OS/400 V5R2 or IBM i.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

supportsSavepoints

public boolean supportsSavepoints()
                           throws SQLException
Indicates if savepoints are supported.

Specified by:
supportsSavepoints in interface DatabaseMetaData
Returns:
True if the user is connecting to a system running OS/400 V5R2 or IBM i, otherwise false. Savepoints are supported only if connecting to OS/400 V5R2 or IBM i.
Throws:
SQLException - This exception is never thrown.
Since:
Modification 5

supportsResultSetType

public boolean supportsResultSetType(int resultSetType)
                              throws SQLException
Indicates if the specified result set type is supported.

Specified by:
supportsResultSetType in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Valid values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
true for ResultSet.TYPE_FORWARD_ONLY ResultSet.TYPE_SCROLL_SENSITIVE. and ResultSet.TYPE_SCROLL_INSENSITIVE.
Throws:
SQLException - If the result set type is not valid.

supportsSchemasInDataManipulation

public boolean supportsSchemasInDataManipulation()
                                          throws SQLException
Indicates if a schema name can be used in a data manipulation statement.

Specified by:
supportsSchemasInDataManipulation in interface DatabaseMetaData
Returns:
Always true. A schema name can be used in a data manipulation statement.
Throws:
SQLException - This exception is never thrown.

supportsSchemasInIndexDefinitions

public boolean supportsSchemasInIndexDefinitions()
                                          throws SQLException
Indicates if a schema name can be used in an index definition statement.

Specified by:
supportsSchemasInIndexDefinitions in interface DatabaseMetaData
Returns:
Always true. A schema name can be used in an index definition statement.
Throws:
SQLException - This exception is never thrown.

supportsSchemasInPrivilegeDefinitions

public boolean supportsSchemasInPrivilegeDefinitions()
                                              throws SQLException
Indicates if a schema name be can used in a privilege definition statement.

Specified by:
supportsSchemasInPrivilegeDefinitions in interface DatabaseMetaData
Returns:
Always true. A schema name can be used in a privilege definition statement.
Throws:
SQLException - This exception is never thrown.

supportsSchemasInProcedureCalls

public boolean supportsSchemasInProcedureCalls()
                                        throws SQLException
Indicates if a schema name be can used in a procedure call statement.

Specified by:
supportsSchemasInProcedureCalls in interface DatabaseMetaData
Returns:
Always true. A schema name can be used in a procedure call statement.
Throws:
SQLException - This exception is never thrown.

supportsSchemasInTableDefinitions

public boolean supportsSchemasInTableDefinitions()
                                          throws SQLException
Indicates if a schema name can be used in a table definition statement.

Specified by:
supportsSchemasInTableDefinitions in interface DatabaseMetaData
Returns:
Always true. A schema name can be used in a table definition statement.
Throws:
SQLException - This exception is never thrown.

supportsSelectForUpdate

public boolean supportsSelectForUpdate()
                                throws SQLException
Indicates if SELECT for UPDATE is supported.

Specified by:
supportsSelectForUpdate in interface DatabaseMetaData
Returns:
Always true. SELECT for UPDATE is supported.
Throws:
SQLException - This exception is never thrown.

supportsStatementPooling

public boolean supportsStatementPooling()
Indicates if statement pooling is supported.

Specified by:
supportsStatementPooling in interface DatabaseMetaData
Returns:
Always false. Statement pooling is not supported at this time.

supportsStoredProcedures

public boolean supportsStoredProcedures()
                                 throws SQLException
Indicates if stored procedure calls using the stored procedure escape syntax are supported.

Specified by:
supportsStoredProcedures in interface DatabaseMetaData
Returns:
Always true. Stored procedure calls using the stored procedure escape syntax are supported.
Throws:
SQLException - This exception is never thrown.

supportsSubqueriesInComparisons

public boolean supportsSubqueriesInComparisons()
                                        throws SQLException
Indicates if subqueries in comparisons are supported.

Specified by:
supportsSubqueriesInComparisons in interface DatabaseMetaData
Returns:
Always true. Subqueries in comparisons are supported.
Throws:
SQLException - This exception is never thrown.

supportsSubqueriesInExists

public boolean supportsSubqueriesInExists()
                                   throws SQLException
Indicates if subqueries in EXISTS expressions are supported.

Specified by:
supportsSubqueriesInExists in interface DatabaseMetaData
Returns:
Always true. Subqueries in EXISTS expressions are supported.
Throws:
SQLException - This exception is never thrown.

supportsSubqueriesInIns

public boolean supportsSubqueriesInIns()
                                throws SQLException
Indicates if subqueries in IN expressions are supported.

Specified by:
supportsSubqueriesInIns in interface DatabaseMetaData
Returns:
Always true. Subqueries in IN expressions are supported.
Throws:
SQLException - This exception is never thrown.

supportsSubqueriesInQuantifieds

public boolean supportsSubqueriesInQuantifieds()
                                        throws SQLException
Indicates if subqueries in quantified expressions are supported.

Specified by:
supportsSubqueriesInQuantifieds in interface DatabaseMetaData
Returns:
Always true. Subqueries in quantified expressions are supported.
Throws:
SQLException - This exception is never thrown.

supportsTableCorrelationNames

public boolean supportsTableCorrelationNames()
                                      throws SQLException
Indicates if table correlation names are supported.

Specified by:
supportsTableCorrelationNames in interface DatabaseMetaData
Returns:
Always true. Table correlation names are supported.
Throws:
SQLException - This exception is never thrown.

supportsTransactionIsolationLevel

public boolean supportsTransactionIsolationLevel(int transactionIsolationLevel)
                                          throws SQLException
Indicates if the database supports the given transaction isolation level.

Specified by:
supportsTransactionIsolationLevel in interface DatabaseMetaData
Parameters:
transactionIsolationLevel - One of the Connection.TRANSACTION_* values.
Returns:
Always true. All transaction isolation levels are supported.
Throws:
SQLException - If the transaction isolation level is not valid.

supportsTransactions

public boolean supportsTransactions()
                             throws SQLException
Indicates if transactions are supported.

Specified by:
supportsTransactions in interface DatabaseMetaData
Returns:
Always true. Transactions are supported.
Throws:
SQLException - This exception is never thrown.

supportsUnion

public boolean supportsUnion()
                      throws SQLException
Indicates if SQL UNION is supported.

Specified by:
supportsUnion in interface DatabaseMetaData
Returns:
Always true. SQL UNION is supported.
Throws:
SQLException - This exception is never thrown.

supportsUnionAll

public boolean supportsUnionAll()
                         throws SQLException
Indicates if SQL UNION ALL is supported.

Specified by:
supportsUnionAll in interface DatabaseMetaData
Returns:
Always true. SQL UNION ALL is supported.
Throws:
SQLException - This exception is never thrown.

toString

public String toString()
Returns the name of the catalog.

Overrides:
toString in class Object
Returns:
The name of the catalog.

updatesAreDetected

public boolean updatesAreDetected(int resultSetType)
                           throws SQLException
Indicates if visible updates to a result set of the specified type can be detected by calling ResultSet.rowUpdated().

Specified by:
updatesAreDetected in interface DatabaseMetaData
Parameters:
resultSetType - The result set type. Value values are:
  • ResultSet.TYPE_FORWARD_ONLY
  • ResultSet.TYPE_SCROLL_INSENSITIVE
  • ResultSet.TYPE_SCROLL_SENSITIVE
Returns:
Always false. Updates can not be detected by calling ResultSet.rowUpdated().
Throws:
SQLException - If the result set type is not valid.

usesLocalFilePerTable

public boolean usesLocalFilePerTable()
                              throws SQLException
Indicates if the database uses a file for each table.

Specified by:
usesLocalFilePerTable in interface DatabaseMetaData
Returns:
Always false. The database does not use a file for each table.
Throws:
SQLException - This exception is never thrown.

usesLocalFiles

public boolean usesLocalFiles()
                       throws SQLException
Indicates if the database stores tables in a local file.

Specified by:
usesLocalFiles in interface DatabaseMetaData
Returns:
Always false. The database does not store tables in a local file.
Throws:
SQLException - This exception is never thrown.

getClientInfoProperties

public ResultSet getClientInfoProperties()
                                  throws SQLException
Retrieves a list of the client info properties that the driver supports. The result set contains the following columns

  1. NAME String=> The name of the client info property
  2. MAX_LEN int=> The maximum length of the value for the property
  3. DEFAULT_VALUE String=> The default value of the property
  4. DESCRIPTION String=> A description of the property. This will typically contain information as to where this property is stored in the database.

The ResultSet is sorted by the NAME column in ascending order

Specified by:
getClientInfoProperties in interface DatabaseMetaData
Returns:
A ResultSet object; each row is a supported client info property

Throws:
SQLException - if a database access error occurs


getSchemas

public ResultSet getSchemas(String catalog,
                            String schemaPattern)
                     throws SQLException
Retrieves the schema names available in this database. The results are ordered by schema name.

The schema column is:

  1. TABLE_SCHEM String => schema name
  2. TABLE_CATALOG String => catalog name (may be null)

Specified by:
getSchemas in interface DatabaseMetaData
Parameters:
catalog - a catalog name; must match the catalog name as it is stored in the database;"" retrieves those without a catalog; null means catalog name should not be used to narrow down the search.
schemaPattern - a schema name; must match the schema name as it is stored in the database; null means schema name should not be used to narrow down the search.
Returns:
a ResultSet object in which each row is a schema decription
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getFunctions

public ResultSet getFunctions(String catalog,
                              String schemaPattern,
                              String functionNamePattern)
                       throws SQLException
Retrieves a description of the user functions available in the given catalog.

Only system and user function descriptions matching the schema and function name criteria are returned. They are ordered by FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME and SPECIFIC_ NAME.

Each function description has the the following columns:

  1. FUNCTION_CAT String => function catalog (may be null)
  2. FUNCTION_SCHEM String => function schema (may be null)
  3. FUNCTION_NAME String => function name. This is the name used to invoke the function
  4. REMARKS String => explanatory comment on the function
  5. FUNCTION_TYPE short => kind of function:
    • functionResultUnknown - Cannot determine if a return value or table will be returned
    • functionNoTable- Does not return a table
    • functionReturnsTable - Returns a table
  6. SPECIFIC_NAME String => the name which uniquely identifies this function within its schema. This is a user specified, or DBMS generated, name that may be different then the FUNCTION_NAME for example with overload functions

A user may not have permissions to execute any of the functions that are returned by getFunctions

Specified by:
getFunctions in interface DatabaseMetaData
Parameters:
catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
functionNamePattern - a function name pattern; must match the function name as it is stored in the database
Returns:
ResultSet - each row is a function description
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()

getFunctionColumns

public ResultSet getFunctionColumns(String catalog,
                                    String schemaPattern,
                                    String functionNamePattern,
                                    String columnNamePattern)
                             throws SQLException
Retrieves a description of the given catalog's system or user function parameters and return type.

Only descriptions matching the schema, function and parameter name criteria are returned. They are ordered by FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME and SPECIFIC_ NAME. Within this, the return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.

Each row in the ResultSet is a parameter description, column description or return type description with the following fields:

  1. FUNCTION_CAT String => function catalog (may be null)
  2. FUNCTION_SCHEM String => function schema (may be null)
  3. FUNCTION_NAME String => function name. This is the name used to invoke the function
  4. COLUMN_NAME String => column/parameter name
  5. COLUMN_TYPE Short => kind of column/parameter:
    • functionColumnUnknown - nobody knows
    • functionColumnIn - IN parameter
    • functionColumnInOut - INOUT parameter
    • functionColumnOut - OUT parameter
    • functionColumnReturn - function return value
    • functionColumnResult - Indicates that the parameter or column is a column in the ResultSet
  6. DATA_TYPE int => SQL type from java.sql.Types
  7. TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
  8. PRECISION int => precision
  9. LENGTH int => length in bytes of data
  10. SCALE short => scale - null is returned for data types where SCALE is not applicable.
  11. RADIX short => radix
  12. NULLABLE short => can it contain NULL.
    • functionNoNulls - does not allow NULL values
    • functionNullable - allows NULL values
    • functionNullableUnknown - nullability unknown
  13. REMARKS String => comment describing column/parameter
  14. CHAR_OCTET_LENGTH int => the maximum length of binary and character based parameters or columns. For any other datatype the returned value is a NULL
  15. ORDINAL_POSITION int => the ordinal position, starting from 1, for the input and output parameters. A value of 0 is returned if this row describes the function's return value. For result set columns, it is the ordinal position of the column in the result set starting from 1.
  16. IS_NULLABLE String => ISO rules are used to determine the nullability for a parameter or column.
    • YES --- if the parameter or column can include NULLs
    • NO --- if the parameter or column cannot include NULLs
    • empty string --- if the nullability for the parameter or column is unknown
  17. SPECIFIC_NAME String => the name which uniquely identifies this function within its schema. This is a user specified, or DBMS generated, name that may be different then the FUNCTION_NAME for example with overload functions

The PRECISION column represents the specified column size for the given parameter or column. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. Null is returned for data types where the column size is not applicable.

Specified by:
getFunctionColumns in interface DatabaseMetaData
Parameters:
catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
functionNamePattern - a procedure name pattern; must match the function name as it is stored in the database
columnNamePattern - a parameter name pattern; must match the parameter or column name as it is stored in the database
Returns:
ResultSet - each row describes a user function parameter, column or return type
Throws:
SQLException - if a database access error occurs
See Also:
getSearchStringEscape()