Class JDBCDatabaseMetaData
- All Implemented Interfaces:
DatabaseMetaData,Wrapper
public class JDBCDatabaseMetaData extends Object implements DatabaseMetaData
-
Field Summary
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, sqlStateSQL99, sqlStateXOpen, tableIndexClustered, tableIndexHashed, tableIndexOther, tableIndexStatistic, typeNoNulls, typeNullable, typeNullableUnknown, typePredBasic, typePredChar, typePredNone, typeSearchable, versionColumnNotPseudo, versionColumnPseudo, versionColumnUnknown -
Constructor Summary
Constructors Constructor Description JDBCDatabaseMetaData(JDBCConnection conn) -
Method Summary
Modifier and Type Method Description booleanallProceduresAreCallable()Returns whether all procedures returned byDatabaseMetaData.getProcedures(java.lang.String, java.lang.String, java.lang.String)can be called by the current user.booleanallTablesAreSelectable()Returns whether all the tables returned bygetTablescan be used by the current user in aSELECTstatement.booleanautoCommitFailureClosesAllResultSets()Determine if a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdablebooleandataDefinitionCausesTransactionCommit()Returns whether a data definition statement in a transaction forces acommitof the transaction.booleandataDefinitionIgnoredInTransactions()Returns whether the database ignores data definition statements within a transaction.booleandeletesAreDetected(int type)Returns whether a visible row delete can be detected by callingResultSet.rowDeleted().booleandoesMaxRowSizeIncludeBlobs()Returns whether the return value ofgetMaxRowSizeincludes the SQL data typesLONGVARCHARandLONGVARBINARY.ResultSetgetAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)Returns aResultSetdescribing a subset of the attributes of a specified SQL User Defined Type (UDT) for a specified schema and catalog.ResultSetgetBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable)Returns a list of a table's optimal set of columns that uniquely identify the rows.ResultSetgetCatalogs()Returns the set of catalog names available in this database.StringgetCatalogSeparator()Returns the separator that this database uses between a catalog name and table name.StringgetCatalogTerm()Returns the term that the database vendor prefers term for "catalog".ResultSetgetClientInfoProperties()Returns a list of the client info properties of the driver.ResultSetgetColumnPrivileges(String catalog, String schema, String table, String columnNamePattern)Returns a description of access rights for a table's columns.ResultSetgetColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)Returns a description of table columns available in a specified catalog.ConnectiongetConnection()Returns the database connection that created this metadata.ResultSetgetCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable)Returns a list of foreign key columns in a given foreign key table that reference the primary key columns of a supplied primary key table.intgetDatabaseMajorVersion()Returns the major version number of the database software.intgetDatabaseMinorVersion()Returns the minor version number of the database software.StringgetDatabaseProductName()Returns the name of the database software.StringgetDatabaseProductVersion()Returns the version number of this database software.intgetDefaultTransactionIsolation()Returns the default transaction isolation level for this database.intgetDriverMajorVersion()Returns the JDBC driver's major version number.intgetDriverMinorVersion()Returns the JDBC driver's minor version number.StringgetDriverName()Returns the name of this JDBC driver.StringgetDriverVersion()Returns the version number of this JDBC driver.ResultSetgetExportedKeys(String catalog, String schema, String table)Returns a list of the foreign key columns that reference the primary key columns of a specified table (the foreign keys exported by a table).StringgetExtraNameCharacters()Returns a string of characters that may be used in unquoted identifier names.ResultSetgetFunctionColumns(String cat, String schema, String func, String colpat)Returns a description according to the given catalog's system or user function parameters and return type.ResultSetgetFunctions(String cat, String schema, String func)Returns a description of the system and user functions available according to the given catalog.StringgetIdentifierQuoteString()Returns the string used to quote SQL identifiers.ResultSetgetImportedKeys(String catalog, String schema, String table)Returns a list columns in a table that are both primary keys and referenced by the table's foreign key columns (that is, the primary keys imported by a table).ResultSetgetIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate)Returns a list of indices and statistics for a specified table.intgetJDBCMajorVersion()Returns this driver's major JDBC version number.intgetJDBCMinorVersion()Returns the minor JDBC version number for this driver.intgetMaxBinaryLiteralLength()Get the maximum number of hex characters in an in-line binary literal for this database.intgetMaxCatalogNameLength()Returns the maximum size of a catalog name in this database.intgetMaxCharLiteralLength()Returns the maximum size for a character literal in this database.intgetMaxColumnNameLength()Returns the maximum size for a Column name for this database.intgetMaxColumnsInGroupBy()Get the maximum number of columns in aGROUP BYclause for this database.intgetMaxColumnsInIndex()Returns the maximum number of columns in an Index for this database.intgetMaxColumnsInOrderBy()Returns the maximum number of columns in anORDER BYclause for this database.intgetMaxColumnsInSelect()Returns the maximum number of columns in aSELECTlist for this database.intgetMaxColumnsInTable()Returns the maximum number of columns in a table for this database.intgetMaxConnections()Returns the database's maximum number of concurrent connections.intgetMaxCursorNameLength()Returns the maximum length of a cursor name for this database.intgetMaxIndexLength()Returns the maximum length in bytes for an Index for this database.intgetMaxProcedureNameLength()Returns the maximum number of characters for a procedure name in this database.intgetMaxRowSize()Returns the maximum number of bytes within a single row for this database.intgetMaxSchemaNameLength()Returns the maximum number of characters in a schema name for this database.intgetMaxStatementLength()Returns the maximum number of characters in an SQL statement for this database.intgetMaxStatements()Get the maximum number of simultaneously open active statements for this database.intgetMaxTableNameLength()Returns the maximum size for a table name in the database.intgetMaxTablesInSelect()Returns the maximum number of tables permitted in aSELECTstatement for the database.intgetMaxUserNameLength()Returns the maximum number of characters in a user name for the database.StringgetNumericFunctions()Returns a list of the math functions available with this database.ResultSetgetPrimaryKeys(String catalog, String schema, String table)Returns a list of the primary key columns of a specified table.ResultSetgetProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)Returns a list of parameter and result columns for the stored procedures belonging to a specified catalog.ResultSetgetProcedures(String catalog, String schemaPattern, String procedureNamePattern)Returns a list of the stored procedures available in a specified catalog.StringgetProcedureTerm()Returns the database vendor's preferred name for "procedure".intgetResultSetHoldability()Returns the result set's default holdability.RowIdLifetimegetRowIdLifetime()Returns the lifetime for which a RowId object remains valid if this data source supports the SQL ROWID typeResultSetgetSchemas()Returns a list of the schema names in the database.ResultSetgetSchemas(String cat, String schema)Returns the schema names ordered by TABLE_CATALOG and TABLE_SCHEMA.StringgetSchemaTerm()Returns the database vendor's preferred term for "schema".StringgetSearchStringEscape()Returns the string that is used to escape wildcard characters.StringgetSQLKeywords()Returns a list of all the SQL keywords that are NOT also SQL92 keywords for the database.intgetSQLStateType()States the type ofSQLStatevalue returned bySQLException.getSQLState.StringgetStringFunctions()Returns a list of string functions available with the database.ResultSetgetSuperTables(String catalog, String schemaPattern, String tableNamePattern)Returns a listing of the hierarchies of tables in a specified schema in the database.ResultSetgetSuperTypes(String catalog, String schemaPattern, String typeNamePattern)Returns the User Defined Type (UDT) hierarchies for a given schema.StringgetSystemFunctions()Returns a list of system functions available with the database.ResultSetgetTablePrivileges(String catalog, String schemaPattern, String tableNamePattern)Returns a description of access rights for each table present in a catalog.ResultSetgetTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)Returns a description of the tables in a specified catalog.ResultSetgetTableTypes()Returns a list of table types supported by the database.StringgetTimeDateFunctions()Returns a list of time and date functions available for the database.ResultSetgetTypeInfo()Get a list of the standard SQL types supported by this database.ResultSetgetUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)Returns a description of the User Defined Types (UDTs) defined in a given schema, which includes the typesDISTINCT,STRUCTandJAVA_OBJECT.StringgetURL()Returns the URL for this database.StringgetUserName()Determine the user name as known by the database.ResultSetgetVersionColumns(String catalog, String schema, String table)Returns which of a table's columns are automatically updated when any value in a row is updated.booleaninsertsAreDetected(int type)Determines whether a visible row insert can be detected by callingResultSet.rowInserted.booleanisCatalogAtStart()Determine whether a fully qualified table name is prefixed or suffixed to a fully qualified table name.booleanisReadOnly()Determines whether the database is in read-only mode.booleanisWrapperFor(Class iface)If the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.booleanlocatorsUpdateCopy()Determines whether updates are made to a copy of, or directly on, Large Objects (LOBs).booleannullPlusNonNullIsNull()Determines whether the database handles concatenations betweenNULLand non-NULLvalues by producing aNULLoutput.booleannullsAreSortedAtEnd()Determines whetherNULLvalues are always sorted to the end of sorted results regardless of requested sort order.booleannullsAreSortedAtStart()Determines whetherNULLvalues are always sorted at the start of the sorted list, irrespective of the sort order.booleannullsAreSortedHigh()Determines whetherNULLvalues are sorted high - i.e.booleannullsAreSortedLow()Determines whetherNULLvalues are sorted low - i.e.booleanothersDeletesAreVisible(int type)Determines whether deletes made by others are visible, for a specifiedResultSettype.booleanothersInsertsAreVisible(int type)Determines whether inserts made by others are visible, for a specifiedResultSettype.booleanothersUpdatesAreVisible(int type)Determines whether updates made by others are visible, for a specifiedResultSettype.booleanownDeletesAreVisible(int type)Determines whether aResultSetcan see its own deletes, for a specifiedResultSettype.booleanownInsertsAreVisible(int type)Determines whether aResultSetcan see its own inserts, for a specifiedResultSettype.booleanownUpdatesAreVisible(int type)Determines whether aResultSetcan see its own updates, for a specifiedResultSettype.booleanstoresLowerCaseIdentifiers()Determines whether the database treats SQL identifiers that are in mixed case (and unquoted) as case insensitive.booleanstoresLowerCaseQuotedIdentifiers()Determines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in lower case.booleanstoresMixedCaseIdentifiers()Determines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.booleanstoresMixedCaseQuotedIdentifiers()Determines whether the database considers identifiers as case insensitive if they are mixed case quoted SQL.booleanstoresUpperCaseIdentifiers()Determines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.booleanstoresUpperCaseQuotedIdentifiers()Determines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in upper case.booleansupportsAlterTableWithAddColumn()Determines whether the database supportsALTER TABLEoperation withADD COLUMN.booleansupportsAlterTableWithDropColumn()Determines whether the database supportsALTER TABLEoperation withDROP COLUMN.booleansupportsANSI92EntryLevelSQL()Determines whether the database supports the ANSI92 entry level SQL grammar.booleansupportsANSI92FullSQL()Determines whether the database supports the ANSI92 full SQL grammar.booleansupportsANSI92IntermediateSQL()Determines whether the database supports the ANSI92 intermediate SQL Grammar.booleansupportsBatchUpdates()Determines whether the database supports batch updates.booleansupportsCatalogsInDataManipulation()Determines whether catalog names may be used in data manipulation statements.booleansupportsCatalogsInIndexDefinitions()Determines whether catalog names can be used in index definition statements.booleansupportsCatalogsInPrivilegeDefinitions()Determines whether catalog names can be used in privilege definition statements.booleansupportsCatalogsInProcedureCalls()Determines whether catalog names can be used in procedure call statements.booleansupportsCatalogsInTableDefinitions()Determines whether catalog names may be used in table definition statements.booleansupportsColumnAliasing()Determines whether the database supports column aliasing.booleansupportsConvert()Determines whether the database supports theCONVERToperation between SQL types.booleansupportsConvert(int fromType, int toType)Determines whether the database supportsCONVERToperation for two supplied SQL types.booleansupportsCoreSQLGrammar()Determines whether the database supports the Core SQL Grammar for ODBC.booleansupportsCorrelatedSubqueries()Determines whether the database supports correlated sub-queries.booleansupportsDataDefinitionAndDataManipulationTransactions()Determines whether the database allows both data definition and data manipulation statements inside a transaction.booleansupportsDataManipulationTransactionsOnly()Determines whether the database only allows data manipulation statements inside a transaction.booleansupportsDifferentTableCorrelationNames()Determines whether table correlation names are required to be different from the names of the tables, when they are supported.booleansupportsExpressionsInOrderBy()Determines whether expressions inORDER BYlists are supported.booleansupportsExtendedSQLGrammar()Determines whether the Extended SQL Grammar for ODBC is supported.booleansupportsFullOuterJoins()Determines whether the database supports full nested outer joins.booleansupportsGetGeneratedKeys()Determines whether auto generated keys can be returned when a statement executes.booleansupportsGroupBy()Determines whether the database supportsGROUP BYclauses.booleansupportsGroupByBeyondSelect()Determines whether the database supports using a column name in aGROUP BYclause not included in theSELECTstatement as long as all of the columns in theSELECTstatement are used in theGROUP BYclause.booleansupportsGroupByUnrelated()Determines whether the database supports using a column name in aGROUP BYclause that is not in theSELECTstatement.booleansupportsIntegrityEnhancementFacility()Determines whether the database supports SQL Integrity Enhancement Facility.booleansupportsLikeEscapeClause()Determines whether the database supports aLIKEescape clause.booleansupportsLimitedOuterJoins()Determines whether the database provides limited support for outer join operations.booleansupportsMinimumSQLGrammar()Determines whether the database supports Minimum SQL Grammar for ODBC.booleansupportsMixedCaseIdentifiers()Determines whether the database treats mixed case unquoted SQL identifiers as case sensitive storing them in mixed case.booleansupportsMixedCaseQuotedIdentifiers()Determines whether the database considers mixed case quoted SQL identifiers as case sensitive, storing them in mixed case.booleansupportsMultipleOpenResults()Determines whether it is possible for a singleCallableStatementto return multipleResultSets simultaneously.booleansupportsMultipleResultSets()Determines whether retrieving multipleResultSets from a single call to theexecutemethod is supported.booleansupportsMultipleTransactions()Determines whether multiple simultaneous transactions on different connections are supported.booleansupportsNamedParameters()Determines whether callable statements with named parameters is supported.booleansupportsNonNullableColumns()Determines whether columns in the database can be defined as non-nullable.booleansupportsOpenCursorsAcrossCommit()Determines whether keeping cursors open across commit operations is supported.booleansupportsOpenCursorsAcrossRollback()Determines whether the database can keep cursors open across rollback operations.booleansupportsOpenStatementsAcrossCommit()Determines whether keeping statements open across commit operations is supported.booleansupportsOpenStatementsAcrossRollback()Determines whether keeping statements open across rollback operations is supported.booleansupportsOrderByUnrelated()Determines whether using a column in anORDER BYclause that is not in theSELECTstatement is supported.booleansupportsOuterJoins()Determines whether outer join operations are supported.booleansupportsPositionedDelete()Determines whether positionedDELETEstatements are supported.booleansupportsPositionedUpdate()Determines whether positionedUPDATEstatements are supported.booleansupportsResultSetConcurrency(int type, int concurrency)Determines whether there is support for a given concurrency style for the givenResultSet.booleansupportsResultSetHoldability(int x)Determines whether the suppliedResultSetholdability mode is supported.booleansupportsResultSetType(int type)Determines whether the suppliedResultSettype is supported.booleansupportsSavepoints()Determines whether savepoints for transactions are supported.booleansupportsSchemasInDataManipulation()Determines whether a schema name may be used in a data manipulation statement.booleansupportsSchemasInIndexDefinitions()Determines whether a schema name may be used in an index definition statement.booleansupportsSchemasInPrivilegeDefinitions()Determines whether a database schema name can be used in a privilege definition statement.booleansupportsSchemasInProcedureCalls()Determines whether a procedure call statement may be contain in a schema name.booleansupportsSchemasInTableDefinitions()Determines whether a schema name can be used in a table definition statement.booleansupportsSelectForUpdate()Determines whether theSELECT FOR UPDATEstatement is supported.booleansupportsStatementPooling()Determines whether statement pooling is supported.booleansupportsStoredFunctionsUsingCallSyntax()Determine if this database supports invoking user-defined or vendor functions using the stored procedure escape syntax.booleansupportsStoredProcedures()Determines whether stored procedure calls using the stored procedure escape syntax is supported.booleansupportsSubqueriesInComparisons()Determines whether subqueries in comparison expressions are supported.booleansupportsSubqueriesInExists()Determines whether subqueries inEXISTSexpressions are supported.booleansupportsSubqueriesInIns()Determines whether subqueries inINstatements are supported.booleansupportsSubqueriesInQuantifieds()Determines whether subqueries in quantified expressions are supported.booleansupportsTableCorrelationNames()Determines whether the database has table correlation names support.booleansupportsTransactionIsolationLevel(int level)Determines whether a specified transaction isolation level is supported.booleansupportsTransactions()Determines whether transactions are supported.booleansupportsUnion()Determines whether theSQL UNIONoperation is supported.booleansupportsUnionAll()Determines whether theSQL UNION ALLoperation is supported.<T> Tunwrap(Class<T> iface)Returns an object that implements the given interface.booleanupdatesAreDetected(int type)Determines whether the methodResultSet.rowUpdatedcan detect a visible row update for the specifiedResultSettype.booleanusesLocalFilePerTable()Determines whether this database uses a file for each table.booleanusesLocalFiles()Determines whether this database uses a local file to store tables.
-
Constructor Details
-
JDBCDatabaseMetaData
-
-
Method Details
-
allProceduresAreCallable
Description copied from interface:DatabaseMetaDataReturns whether all procedures returned byDatabaseMetaData.getProcedures(java.lang.String, java.lang.String, java.lang.String)can be called by the current user.- Specified by:
allProceduresAreCallablein interfaceDatabaseMetaData- Returns:
trueif all procedures can be called by the current user,falseotherwise.- Throws:
SQLException- if there is a database error.
-
allTablesAreSelectable
Description copied from interface:DatabaseMetaDataReturns whether all the tables returned bygetTablescan be used by the current user in aSELECTstatement.- Specified by:
allTablesAreSelectablein interfaceDatabaseMetaData- Returns:
trueif all the tables can be used,falseotherwise.- Throws:
SQLException- if there is a database error.
-
getURL
Description copied from interface:DatabaseMetaDataReturns the URL for this database.- Specified by:
getURLin interfaceDatabaseMetaData- Returns:
- the URL for the database.
nullif it cannot be generated. - Throws:
SQLException- a database error occurred.
-
getUserName
Description copied from interface:DatabaseMetaDataDetermine the user name as known by the database.- Specified by:
getUserNamein interfaceDatabaseMetaData- Returns:
- the user name.
- Throws:
SQLException- a database error occurred.
-
isReadOnly
Description copied from interface:DatabaseMetaDataDetermines whether the database is in read-only mode.- Specified by:
isReadOnlyin interfaceDatabaseMetaData- Returns:
trueif the database is in read-only mode,falseotherwise.- Throws:
SQLException- a database error occurred.
-
nullsAreSortedHigh
Description copied from interface:DatabaseMetaDataDetermines whetherNULLvalues are sorted high - i.e. they are sorted as if they are higher than any other values.- Specified by:
nullsAreSortedHighin interfaceDatabaseMetaData- Returns:
trueifNULLvalues are sorted high,falseotherwise.- Throws:
SQLException- a database error occurred.
-
nullsAreSortedLow
Description copied from interface:DatabaseMetaDataDetermines whetherNULLvalues are sorted low - i.e. they are sorted as if they are lower than any other values.- Specified by:
nullsAreSortedLowin interfaceDatabaseMetaData- Returns:
trueifNULLvalues are sorted low,falseotherwise.- Throws:
SQLException- a database error occurred.
-
nullsAreSortedAtStart
Description copied from interface:DatabaseMetaDataDetermines whetherNULLvalues are always sorted at the start of the sorted list, irrespective of the sort order. This means that they appear at the start of sorted lists, whatever other values may be present.- Specified by:
nullsAreSortedAtStartin interfaceDatabaseMetaData- Returns:
trueifNULLvalues are sorted at the start,falseotherwise.- Throws:
SQLException- a database error occurred.
-
nullsAreSortedAtEnd
Description copied from interface:DatabaseMetaDataDetermines whetherNULLvalues are always sorted to the end of sorted results regardless of requested sort order. This means that they will appear at the end of sorted lists whatever other non-NULLvalues may be present.- Specified by:
nullsAreSortedAtEndin interfaceDatabaseMetaData- Returns:
trueifNULLvalues are sorted at the end,falseotherwise.- Throws:
SQLException- a database error occurred.
-
getDatabaseProductName
Description copied from interface:DatabaseMetaDataReturns the name of the database software.- Specified by:
getDatabaseProductNamein interfaceDatabaseMetaData- Returns:
- a
Stringwith the name of the database software. - Throws:
SQLException- a database error occurred.
-
getDatabaseProductVersion
Description copied from interface:DatabaseMetaDataReturns the version number of this database software.- Specified by:
getDatabaseProductVersionin interfaceDatabaseMetaData- Returns:
- a
Stringwith the version number of the database software. - Throws:
SQLException- a database error occurred.
-
getDriverName
Description copied from interface:DatabaseMetaDataReturns the name of this JDBC driver.- Specified by:
getDriverNamein interfaceDatabaseMetaData- Returns:
- a
Stringcontaining the name of the JDBC driver - Throws:
SQLException- a database error occurred.
-
getDriverVersion
Description copied from interface:DatabaseMetaDataReturns the version number of this JDBC driver.- Specified by:
getDriverVersionin interfaceDatabaseMetaData- Returns:
- a
Stringcontaining the complete version number of the JDBC driver. - Throws:
SQLException- a database error occurred.
-
getDriverMajorVersion
public int getDriverMajorVersion()Description copied from interface:DatabaseMetaDataReturns the JDBC driver's major version number.- Specified by:
getDriverMajorVersionin interfaceDatabaseMetaData- Returns:
- the driver's major version number.
-
getDriverMinorVersion
public int getDriverMinorVersion()Description copied from interface:DatabaseMetaDataReturns the JDBC driver's minor version number.- Specified by:
getDriverMinorVersionin interfaceDatabaseMetaData- Returns:
- the driver's minor version number.
-
usesLocalFiles
Description copied from interface:DatabaseMetaDataDetermines whether this database uses a local file to store tables.- Specified by:
usesLocalFilesin interfaceDatabaseMetaData- Returns:
trueif the database stores tables in a local file, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
usesLocalFilePerTable
Description copied from interface:DatabaseMetaDataDetermines whether this database uses a file for each table.- Specified by:
usesLocalFilePerTablein interfaceDatabaseMetaData- Returns:
trueif the database uses one file for each table, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsMixedCaseIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database treats mixed case unquoted SQL identifiers as case sensitive storing them in mixed case.- Specified by:
supportsMixedCaseIdentifiersin interfaceDatabaseMetaData- Returns:
trueif unquoted SQL identifiers are stored in mixed case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
storesUpperCaseIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in upper case.- Specified by:
storesUpperCaseIdentifiersin interfaceDatabaseMetaData- Returns:
trueif unquoted SQL identifiers are stored in upper case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
storesLowerCaseIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database treats SQL identifiers that are in mixed case (and unquoted) as case insensitive. Iftruethen the database stores them in lower case.- Specified by:
storesLowerCaseIdentifiersin interfaceDatabaseMetaData- Returns:
trueif unquoted SQL identifiers are stored in lower case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
storesMixedCaseIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database considers mixed case unquoted SQL identifiers as case insensitive and stores them in mixed case.- Specified by:
storesMixedCaseIdentifiersin interfaceDatabaseMetaData- Returns:
trueif unquoted SQL identifiers as stored in mixed case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsMixedCaseQuotedIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database considers mixed case quoted SQL identifiers as case sensitive, storing them in mixed case.- Specified by:
supportsMixedCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
trueif quoted SQL identifiers are stored in mixed case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
storesUpperCaseQuotedIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in upper case.- Specified by:
storesUpperCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
trueif quoted SQL identifiers are stored in upper case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
storesLowerCaseQuotedIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database considers mixed case quoted SQL identifiers as case insensitive and stores them in lower case.- Specified by:
storesLowerCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
trueif quoted SQL identifiers are stored in lower case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
storesMixedCaseQuotedIdentifiers
Description copied from interface:DatabaseMetaDataDetermines whether the database considers identifiers as case insensitive if they are mixed case quoted SQL. The database stores them in mixed case.- Specified by:
storesMixedCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
trueif quoted SQL identifiers are stored in mixed case,falseotherwise.- Throws:
SQLException- a database error occurred.
-
getIdentifierQuoteString
Description copied from interface:DatabaseMetaDataReturns the string used to quote SQL identifiers. Returns " " (space) if identifier quoting not supported.- Specified by:
getIdentifierQuoteStringin interfaceDatabaseMetaData- Returns:
- the String used to quote SQL identifiers.
- Throws:
SQLException- a database error occurred.
-
getSQLKeywords
Description copied from interface:DatabaseMetaDataReturns a list of all the SQL keywords that are NOT also SQL92 keywords for the database.- Specified by:
getSQLKeywordsin interfaceDatabaseMetaData- Returns:
- a String containing the list of SQL keywords in a comma separated format.
- Throws:
SQLException- a database error occurred.
-
getNumericFunctions
Description copied from interface:DatabaseMetaDataReturns a list of the math functions available with this database. These are used in the JDBC function escape clause and are the Open Group CLI math function names.- Specified by:
getNumericFunctionsin interfaceDatabaseMetaData- Returns:
- a String which contains the list of math functions as a comma separated list.
- Throws:
SQLException- a database error occurred.
-
getStringFunctions
Description copied from interface:DatabaseMetaDataReturns a list of string functions available with the database. These functions are used in JDBC function escape clause and follow the Open Group CLI string function names definition.- Specified by:
getStringFunctionsin interfaceDatabaseMetaData- Returns:
- a String containing the list of string functions in comma separated format.
- Throws:
SQLException- a database error occurred.
-
getSystemFunctions
Description copied from interface:DatabaseMetaDataReturns a list of system functions available with the database. These are names used in the JDBC function escape clause and are Open Group CLI function names.- Specified by:
getSystemFunctionsin interfaceDatabaseMetaData- Returns:
- a String containing the list of system functions in a comma separated format.
- Throws:
SQLException- a database error occurred.
-
getTimeDateFunctions
Description copied from interface:DatabaseMetaDataReturns a list of time and date functions available for the database.- Specified by:
getTimeDateFunctionsin interfaceDatabaseMetaData- Returns:
- a string containing a comma separated list of the time and date functions.
- Throws:
SQLException- a database error occurred.
-
getSearchStringEscape
Description copied from interface:DatabaseMetaDataReturns the string that is used to escape wildcard characters. This string is used to escape the'_'and'%'wildcard characters in catalog search pattern strings.'_'is used to represent any single character while'%'is used for a sequence of zero or more characters.- Specified by:
getSearchStringEscapein interfaceDatabaseMetaData- Returns:
- a String used to escape the wildcard characters.
- Throws:
SQLException- a database error occurred.
-
getExtraNameCharacters
Description copied from interface:DatabaseMetaDataReturns a string of characters that may be used in unquoted identifier names. The charactersa-z,A-Z,0-9and_are always permitted.- Specified by:
getExtraNameCharactersin interfaceDatabaseMetaData- Returns:
- a String containing all the additional permitted characters.
- Throws:
SQLException- a database error occurred.
-
supportsAlterTableWithAddColumn
Description copied from interface:DatabaseMetaDataDetermines whether the database supportsALTER TABLEoperation withADD COLUMN.- Specified by:
supportsAlterTableWithAddColumnin interfaceDatabaseMetaData- Returns:
trueifALTER TABLEwithADD COLUMNis supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsAlterTableWithDropColumn
Description copied from interface:DatabaseMetaDataDetermines whether the database supportsALTER TABLEoperation withDROP COLUMN.- Specified by:
supportsAlterTableWithDropColumnin interfaceDatabaseMetaData- Returns:
trueifALTER TABLEwithDROP COLUMNis supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsColumnAliasing
Description copied from interface:DatabaseMetaDataDetermines whether the database supports column aliasing.If aliasing is supported, then the SQL AS clause is used to provide names for computed columns and provide alias names for columns.
- Specified by:
supportsColumnAliasingin interfaceDatabaseMetaData- Returns:
trueif column aliasing is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
nullPlusNonNullIsNull
Description copied from interface:DatabaseMetaDataDetermines whether the database handles concatenations betweenNULLand non-NULLvalues by producing aNULLoutput.- Specified by:
nullPlusNonNullIsNullin interfaceDatabaseMetaData- Returns:
trueifNULLto non-NULLconcatenations produce aNULLresult,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsConvert
Description copied from interface:DatabaseMetaDataDetermines whether the database supports theCONVERToperation between SQL types.- Specified by:
supportsConvertin interfaceDatabaseMetaData- Returns:
trueif theCONVERToperation is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsConvert
Description copied from interface:DatabaseMetaDataDetermines whether the database supportsCONVERToperation for two supplied SQL types.- Specified by:
supportsConvertin interfaceDatabaseMetaData- Parameters:
fromType- the Type to convert from, as defined byjava.sql.TypestoType- the Type to convert to, as defined byjava.sql.Types- Returns:
trueif theCONVERToperation is supported for these types,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsTableCorrelationNames
Description copied from interface:DatabaseMetaDataDetermines whether the database has table correlation names support.- Specified by:
supportsTableCorrelationNamesin interfaceDatabaseMetaData- Returns:
trueif table correlation names are supported, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsDifferentTableCorrelationNames
Description copied from interface:DatabaseMetaDataDetermines whether table correlation names are required to be different from the names of the tables, when they are supported.- Specified by:
supportsDifferentTableCorrelationNamesin interfaceDatabaseMetaData- Returns:
trueif correlation names must be different from table names,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsExpressionsInOrderBy
Description copied from interface:DatabaseMetaDataDetermines whether expressions inORDER BYlists are supported.- Specified by:
supportsExpressionsInOrderByin interfaceDatabaseMetaData- Returns:
trueif expressions inORDER BYlists are supported.- Throws:
SQLException- a database error occurred.
-
supportsGroupBy
Description copied from interface:DatabaseMetaDataDetermines whether the database supportsGROUP BYclauses.- Specified by:
supportsGroupByin interfaceDatabaseMetaData- Returns:
trueif theGROUP BYclause is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsGroupByBeyondSelect
Description copied from interface:DatabaseMetaDataDetermines whether the database supports using a column name in aGROUP BYclause not included in theSELECTstatement as long as all of the columns in theSELECTstatement are used in theGROUP BYclause.- Specified by:
supportsGroupByBeyondSelectin interfaceDatabaseMetaData- Returns:
trueifGROUP BYclauses can use column names in this way,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsLikeEscapeClause
Description copied from interface:DatabaseMetaDataDetermines whether the database supports aLIKEescape clause.- Specified by:
supportsLikeEscapeClausein interfaceDatabaseMetaData- Returns:
trueif LIKE escape clause is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsMultipleResultSets
Description copied from interface:DatabaseMetaDataDetermines whether retrieving multipleResultSets from a single call to theexecutemethod is supported.- Specified by:
supportsMultipleResultSetsin interfaceDatabaseMetaData- Returns:
trueif multipleResultSets can be retrieved,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsMultipleTransactions
Description copied from interface:DatabaseMetaDataDetermines whether multiple simultaneous transactions on different connections are supported.- Specified by:
supportsMultipleTransactionsin interfaceDatabaseMetaData- Returns:
trueif multiple open transactions are supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsNonNullableColumns
Description copied from interface:DatabaseMetaDataDetermines whether columns in the database can be defined as non-nullable.- Specified by:
supportsNonNullableColumnsin interfaceDatabaseMetaData- Returns:
trueif columns can be defined non-nullable,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsMinimumSQLGrammar
Description copied from interface:DatabaseMetaDataDetermines whether the database supports Minimum SQL Grammar for ODBC.- Specified by:
supportsMinimumSQLGrammarin interfaceDatabaseMetaData- Returns:
trueif the Minimum SQL Grammar is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsCoreSQLGrammar
Description copied from interface:DatabaseMetaDataDetermines whether the database supports the Core SQL Grammar for ODBC.- Specified by:
supportsCoreSQLGrammarin interfaceDatabaseMetaData- Returns:
trueif the Core SQL Grammar is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsExtendedSQLGrammar
Description copied from interface:DatabaseMetaDataDetermines whether the Extended SQL Grammar for ODBC is supported.- Specified by:
supportsExtendedSQLGrammarin interfaceDatabaseMetaData- Returns:
trueif the Extended SQL Grammar is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsANSI92EntryLevelSQL
Description copied from interface:DatabaseMetaDataDetermines whether the database supports the ANSI92 entry level SQL grammar.- Specified by:
supportsANSI92EntryLevelSQLin interfaceDatabaseMetaData- Returns:
trueif the ANSI92 entry level SQL grammar is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsANSI92IntermediateSQL
Description copied from interface:DatabaseMetaDataDetermines whether the database supports the ANSI92 intermediate SQL Grammar.- Specified by:
supportsANSI92IntermediateSQLin interfaceDatabaseMetaData- Returns:
trueif the ANSI92 intermediate SQL grammar is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsANSI92FullSQL
Description copied from interface:DatabaseMetaDataDetermines whether the database supports the ANSI92 full SQL grammar.- Specified by:
supportsANSI92FullSQLin interfaceDatabaseMetaData- Returns:
trueif the ANSI92 full SQL grammar is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsIntegrityEnhancementFacility
Description copied from interface:DatabaseMetaDataDetermines whether the database supports SQL Integrity Enhancement Facility.- Specified by:
supportsIntegrityEnhancementFacilityin interfaceDatabaseMetaData- Returns:
trueif the Integrity Enhancement Facility is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsOuterJoins
Description copied from interface:DatabaseMetaDataDetermines whether outer join operations are supported.- Specified by:
supportsOuterJoinsin interfaceDatabaseMetaData- Returns:
trueif outer join operations are supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsFullOuterJoins
Description copied from interface:DatabaseMetaDataDetermines whether the database supports full nested outer joins.- Specified by:
supportsFullOuterJoinsin interfaceDatabaseMetaData- Returns:
trueif full nested outer joins are supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsLimitedOuterJoins
Description copied from interface:DatabaseMetaDataDetermines whether the database provides limited support for outer join operations.- Specified by:
supportsLimitedOuterJoinsin interfaceDatabaseMetaData- Returns:
trueif there is limited support for outer join operations,falseotherwise. This will betrueifsupportsFullOuterJoinsreturnstrue.- Throws:
SQLException- a database error occurred.
-
getSchemaTerm
Description copied from interface:DatabaseMetaDataReturns the database vendor's preferred term for "schema".- Specified by:
getSchemaTermin interfaceDatabaseMetaData- Returns:
- a String which is the vendor's preferred term for schema.
- Throws:
SQLException- a database error occurred.
-
getProcedureTerm
Description copied from interface:DatabaseMetaDataReturns the database vendor's preferred name for "procedure".- Specified by:
getProcedureTermin interfaceDatabaseMetaData- Returns:
- a String with the vendor's preferred name for "procedure".
- Throws:
SQLException- a database error occurred.
-
getCatalogTerm
Description copied from interface:DatabaseMetaDataReturns the term that the database vendor prefers term for "catalog".- Specified by:
getCatalogTermin interfaceDatabaseMetaData- Returns:
- a String with the vendor's term for "catalog".
- Throws:
SQLException- if there is a database error.
-
isCatalogAtStart
Description copied from interface:DatabaseMetaDataDetermine whether a fully qualified table name is prefixed or suffixed to a fully qualified table name.- Specified by:
isCatalogAtStartin interfaceDatabaseMetaData- Returns:
trueif the catalog appears at the start of a fully qualified table name,falseotherwise.- Throws:
SQLException- a database error occurred.
-
getCatalogSeparator
Description copied from interface:DatabaseMetaDataReturns the separator that this database uses between a catalog name and table name.- Specified by:
getCatalogSeparatorin interfaceDatabaseMetaData- Returns:
- a String containing the separator.
- Throws:
SQLException- if there is a database error.
-
supportsSchemasInDataManipulation
Description copied from interface:DatabaseMetaDataDetermines whether a schema name may be used in a data manipulation statement.- Specified by:
supportsSchemasInDataManipulationin interfaceDatabaseMetaData- Returns:
trueif a schema name can be used in a data manipulation, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSchemasInProcedureCalls
Description copied from interface:DatabaseMetaDataDetermines whether a procedure call statement may be contain in a schema name.- Specified by:
supportsSchemasInProcedureCallsin interfaceDatabaseMetaData- Returns:
trueif a schema name can be used in a procedure call, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSchemasInTableDefinitions
Description copied from interface:DatabaseMetaDataDetermines whether a schema name can be used in a table definition statement.- Specified by:
supportsSchemasInTableDefinitionsin interfaceDatabaseMetaData- Returns:
trueif a schema name can be used in a table definition, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSchemasInIndexDefinitions
Description copied from interface:DatabaseMetaDataDetermines whether a schema name may be used in an index definition statement.- Specified by:
supportsSchemasInIndexDefinitionsin interfaceDatabaseMetaData- Returns:
trueif a schema name can be used in an index definition, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSchemasInPrivilegeDefinitions
Description copied from interface:DatabaseMetaDataDetermines whether a database schema name can be used in a privilege definition statement.- Specified by:
supportsSchemasInPrivilegeDefinitionsin interfaceDatabaseMetaData- Returns:
trueif a database schema name may be used in a privilege definition, otherwisefalse- Throws:
SQLException- a database error occurred.
-
supportsCatalogsInDataManipulation
Description copied from interface:DatabaseMetaDataDetermines whether catalog names may be used in data manipulation statements.- Specified by:
supportsCatalogsInDataManipulationin interfaceDatabaseMetaData- Returns:
trueif catalog names can be used in data manipulation statements,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsCatalogsInProcedureCalls
Description copied from interface:DatabaseMetaDataDetermines whether catalog names can be used in procedure call statements.- Specified by:
supportsCatalogsInProcedureCallsin interfaceDatabaseMetaData- Returns:
trueif catalog names can be used in procedure call statements.- Throws:
SQLException- a database error occurred.
-
supportsCatalogsInTableDefinitions
Description copied from interface:DatabaseMetaDataDetermines whether catalog names may be used in table definition statements.- Specified by:
supportsCatalogsInTableDefinitionsin interfaceDatabaseMetaData- Returns:
trueif catalog names can be used in definition statements,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsCatalogsInIndexDefinitions
Description copied from interface:DatabaseMetaDataDetermines whether catalog names can be used in index definition statements.- Specified by:
supportsCatalogsInIndexDefinitionsin interfaceDatabaseMetaData- Returns:
trueif catalog names can be used in index definition statements,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsCatalogsInPrivilegeDefinitions
Description copied from interface:DatabaseMetaDataDetermines whether catalog names can be used in privilege definition statements.- Specified by:
supportsCatalogsInPrivilegeDefinitionsin interfaceDatabaseMetaData- Returns:
trueif catalog names can be used in privilege definition statements,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsPositionedDelete
Description copied from interface:DatabaseMetaDataDetermines whether positionedDELETEstatements are supported.- Specified by:
supportsPositionedDeletein interfaceDatabaseMetaData- Returns:
trueif the database supports positionedDELETEstatements.- Throws:
SQLException- a database error occurred.
-
supportsPositionedUpdate
Description copied from interface:DatabaseMetaDataDetermines whether positionedUPDATEstatements are supported.- Specified by:
supportsPositionedUpdatein interfaceDatabaseMetaData- Returns:
trueif the database supports positionedUPDATEstatements,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsSelectForUpdate
Description copied from interface:DatabaseMetaDataDetermines whether theSELECT FOR UPDATEstatement is supported.- Specified by:
supportsSelectForUpdatein interfaceDatabaseMetaData- Returns:
trueifSELECT FOR UPDATEstatements are supported, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsStoredProcedures
Description copied from interface:DatabaseMetaDataDetermines whether stored procedure calls using the stored procedure escape syntax is supported.- Specified by:
supportsStoredProceduresin interfaceDatabaseMetaData- Returns:
trueif stored procedure calls using the stored procedure escape syntax are supported, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSubqueriesInComparisons
Description copied from interface:DatabaseMetaDataDetermines whether subqueries in comparison expressions are supported.- Specified by:
supportsSubqueriesInComparisonsin interfaceDatabaseMetaData- Returns:
trueif subqueries are supported in comparison expressions.- Throws:
SQLException- a database error occurred.
-
supportsSubqueriesInExists
Description copied from interface:DatabaseMetaDataDetermines whether subqueries inEXISTSexpressions are supported.- Specified by:
supportsSubqueriesInExistsin interfaceDatabaseMetaData- Returns:
trueif subqueries are supported inEXISTSexpressions, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSubqueriesInIns
Description copied from interface:DatabaseMetaDataDetermines whether subqueries inINstatements are supported.- Specified by:
supportsSubqueriesInInsin interfaceDatabaseMetaData- Returns:
trueif subqueries are supported inINstatements, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsSubqueriesInQuantifieds
Description copied from interface:DatabaseMetaDataDetermines whether subqueries in quantified expressions are supported.- Specified by:
supportsSubqueriesInQuantifiedsin interfaceDatabaseMetaData- Returns:
trueif subqueries are supported, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsUnion
Description copied from interface:DatabaseMetaDataDetermines whether theSQL UNIONoperation is supported.- Specified by:
supportsUnionin interfaceDatabaseMetaData- Returns:
trueof the database does supportUNION, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsUnionAll
Description copied from interface:DatabaseMetaDataDetermines whether theSQL UNION ALLoperation is supported.- Specified by:
supportsUnionAllin interfaceDatabaseMetaData- Returns:
trueif the database does supportUNION ALL, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsOpenCursorsAcrossCommit
Description copied from interface:DatabaseMetaDataDetermines whether keeping cursors open across commit operations is supported.- Specified by:
supportsOpenCursorsAcrossCommitin interfaceDatabaseMetaData- Returns:
trueif cursors can be kept open across commit operations,falseif they might get closed.- Throws:
SQLException- a database error occurred.
-
supportsOpenCursorsAcrossRollback
Description copied from interface:DatabaseMetaDataDetermines whether the database can keep cursors open across rollback operations.- Specified by:
supportsOpenCursorsAcrossRollbackin interfaceDatabaseMetaData- Returns:
trueif cursors can be kept open across rollback operations,falseif they might get closed.- Throws:
SQLException- a database error occurred.
-
supportsOpenStatementsAcrossCommit
Description copied from interface:DatabaseMetaDataDetermines whether keeping statements open across commit operations is supported.- Specified by:
supportsOpenStatementsAcrossCommitin interfaceDatabaseMetaData- Returns:
trueif statements can be kept open,falseif they might not.- Throws:
SQLException- a database error occurred.
-
supportsOpenStatementsAcrossRollback
Description copied from interface:DatabaseMetaDataDetermines whether keeping statements open across rollback operations is supported.- Specified by:
supportsOpenStatementsAcrossRollbackin interfaceDatabaseMetaData- Returns:
trueif statements can be kept open,falseif they might not.- Throws:
SQLException- a database error occurred.
-
getMaxBinaryLiteralLength
Description copied from interface:DatabaseMetaDataGet the maximum number of hex characters in an in-line binary literal for this database.- Specified by:
getMaxBinaryLiteralLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of hex characters in an in-line binary literal. If the number is unlimited then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxCharLiteralLength
Description copied from interface:DatabaseMetaDataReturns the maximum size for a character literal in this database.- Specified by:
getMaxCharLiteralLengthin interfaceDatabaseMetaData- Returns:
- the maximum size in characters for a character literal. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxColumnNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum size for a Column name for this database.- Specified by:
getMaxColumnNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of characters for a Column name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxColumnsInGroupBy
Description copied from interface:DatabaseMetaDataGet the maximum number of columns in aGROUP BYclause for this database.- Specified by:
getMaxColumnsInGroupByin interfaceDatabaseMetaData- Returns:
- the maximum number of columns in a
GROUP BYclause. If the limit is unknown, or the value is unlimited, then the result is zero. - Throws:
SQLException- a database error occurred.
-
getMaxColumnsInIndex
Description copied from interface:DatabaseMetaDataReturns the maximum number of columns in an Index for this database.- Specified by:
getMaxColumnsInIndexin interfaceDatabaseMetaData- Returns:
- the maximum number of columns in an Index. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxColumnsInOrderBy
Description copied from interface:DatabaseMetaDataReturns the maximum number of columns in anORDER BYclause for this database.- Specified by:
getMaxColumnsInOrderByin interfaceDatabaseMetaData- Returns:
- the maximum number of columns in an
ORDER BYclause. If the limit is unknown, or the value is unlimited, then the result is zero. - Throws:
SQLException- a database error occurred.
-
getMaxColumnsInSelect
Description copied from interface:DatabaseMetaDataReturns the maximum number of columns in aSELECTlist for this database.- Specified by:
getMaxColumnsInSelectin interfaceDatabaseMetaData- Returns:
- the maximum number of columns in a
SELECTlist. If the limit is unknown, or the value is unlimited, then the result is zero. - Throws:
SQLException- a database error occurred.
-
getMaxColumnsInTable
Description copied from interface:DatabaseMetaDataReturns the maximum number of columns in a table for this database.- Specified by:
getMaxColumnsInTablein interfaceDatabaseMetaData- Returns:
- the maximum number of columns in a table. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxConnections
Description copied from interface:DatabaseMetaDataReturns the database's maximum number of concurrent connections.- Specified by:
getMaxConnectionsin interfaceDatabaseMetaData- Returns:
- the maximum number of connections. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxCursorNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum length of a cursor name for this database.- Specified by:
getMaxCursorNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of characters in a cursor name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxIndexLength
Description copied from interface:DatabaseMetaDataReturns the maximum length in bytes for an Index for this database. This covers all the parts of a composite index.- Specified by:
getMaxIndexLengthin interfaceDatabaseMetaData- Returns:
- the maximum length in bytes for an Index. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxSchemaNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum number of characters in a schema name for this database.- Specified by:
getMaxSchemaNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of characters in a schema name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxProcedureNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum number of characters for a procedure name in this database.- Specified by:
getMaxProcedureNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of character for a procedure name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxCatalogNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum size of a catalog name in this database.- Specified by:
getMaxCatalogNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum size in characters for a catalog name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxRowSize
Description copied from interface:DatabaseMetaDataReturns the maximum number of bytes within a single row for this database.- Specified by:
getMaxRowSizein interfaceDatabaseMetaData- Returns:
- the maximum number of bytes for a single row. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
doesMaxRowSizeIncludeBlobs
Description copied from interface:DatabaseMetaDataReturns whether the return value ofgetMaxRowSizeincludes the SQL data typesLONGVARCHARandLONGVARBINARY.- Specified by:
doesMaxRowSizeIncludeBlobsin interfaceDatabaseMetaData- Returns:
trueif the return value includesLONGVARBINARYandLONGVARCHAR, otherwisefalse.- Throws:
SQLException- if there is a database error.
-
getMaxStatementLength
Description copied from interface:DatabaseMetaDataReturns the maximum number of characters in an SQL statement for this database.- Specified by:
getMaxStatementLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of characters in an SQL statement. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxStatements
Description copied from interface:DatabaseMetaDataGet the maximum number of simultaneously open active statements for this database.- Specified by:
getMaxStatementsin interfaceDatabaseMetaData- Returns:
- the maximum number of open active statements. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxTableNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum size for a table name in the database.- Specified by:
getMaxTableNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum size in characters for a table name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getMaxTablesInSelect
Description copied from interface:DatabaseMetaDataReturns the maximum number of tables permitted in aSELECTstatement for the database.- Specified by:
getMaxTablesInSelectin interfaceDatabaseMetaData- Returns:
- the maximum number of tables permitted in a
SELECTstatement. If the limit is unknown, or the value is unlimited, then the result is zero. - Throws:
SQLException- a database error occurred.
-
getMaxUserNameLength
Description copied from interface:DatabaseMetaDataReturns the maximum number of characters in a user name for the database.- Specified by:
getMaxUserNameLengthin interfaceDatabaseMetaData- Returns:
- the maximum number of characters in a user name. If the limit is unknown, or the value is unlimited, then the result is zero.
- Throws:
SQLException- a database error occurred.
-
getDefaultTransactionIsolation
Description copied from interface:DatabaseMetaDataReturns the default transaction isolation level for this database.- Specified by:
getDefaultTransactionIsolationin interfaceDatabaseMetaData- Returns:
- the default transaction isolation level. One of the following values:
TRANSACTION_NONETRANSACTION_READ_COMMITTEDTRANSACTION_READ_UNCOMMITTEDTRANSACTION_REPEATABLE_READTRANSACTION_SERIALIZABLE
- Throws:
SQLException- a database error occurred.
-
supportsTransactions
Description copied from interface:DatabaseMetaDataDetermines whether transactions are supported.If transactions are not supported, then the
commitmethod does nothing and the transaction isolation level is alwaysTRANSACTION_NONE.- Specified by:
supportsTransactionsin interfaceDatabaseMetaData- Returns:
trueif transactions are supported, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsTransactionIsolationLevel
Description copied from interface:DatabaseMetaDataDetermines whether a specified transaction isolation level is supported.- Specified by:
supportsTransactionIsolationLevelin interfaceDatabaseMetaData- Parameters:
level- the transaction isolation level, as specified injava.sql.Connection:TRANSACTION_NONE,TRANSACTION_READ_COMMITTED,TRANSACTION_READ_UNCOMMITTED,TRANSACTION_REPEATABLE_READ,TRANSACTION_SERIALIZABLE- Returns:
trueif the specific isolation level is supported, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
supportsDataDefinitionAndDataManipulationTransactions
Description copied from interface:DatabaseMetaDataDetermines whether the database allows both data definition and data manipulation statements inside a transaction.- Specified by:
supportsDataDefinitionAndDataManipulationTransactionsin interfaceDatabaseMetaData- Returns:
trueif both types of statement are permitted,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsDataManipulationTransactionsOnly
Description copied from interface:DatabaseMetaDataDetermines whether the database only allows data manipulation statements inside a transaction.- Specified by:
supportsDataManipulationTransactionsOnlyin interfaceDatabaseMetaData- Returns:
trueif data manipulation statements are permitted only within a transaction,falseotherwise.- Throws:
SQLException- a database error occurred.
-
dataDefinitionCausesTransactionCommit
Description copied from interface:DatabaseMetaDataReturns whether a data definition statement in a transaction forces acommitof the transaction.- Specified by:
dataDefinitionCausesTransactionCommitin interfaceDatabaseMetaData- Returns:
trueif the statement forces a commit,falseotherwise.- Throws:
SQLException- if there is a database error.
-
dataDefinitionIgnoredInTransactions
Description copied from interface:DatabaseMetaDataReturns whether the database ignores data definition statements within a transaction.- Specified by:
dataDefinitionIgnoredInTransactionsin interfaceDatabaseMetaData- Returns:
trueif the database ignores a data definition statement,falseotherwise.- Throws:
SQLException- if there is a database error.
-
getProcedures
public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a list of the stored procedures available in a specified catalog.The list is returned as a
ResultSetwith one row for each stored procedure, ordered by PROCEDURE_SCHEM and PROCEDURE_NAME, with the data in each row as follows:PROCEDURE_CAT- String : the procedure catalog namePROCEDURE_SCHEM- String : the procedure schema name (possiblynull)PROCEDURE_NAME- String : the procedure nameReservedReservedReservedREMARKS- String - information about the procedurePROCEDURE_TYPE- short : one of:DatabaseMetaData.procedureResultUnknown- procedure may return a resultDatabaseMetaData.procedureNoResult- procedure does not return a resultDatabaseMetaData.procedureReturnsResult- procedure definitely returns a result
- Specified by:
getProceduresin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.procedureNamePattern- a procedure name pattern, which must match the procedure name stored in the database.- Returns:
- a
ResultSetwhere each row is a description of a stored procedure in the format defined above. - Throws:
SQLException- a database error occurred.
-
getProcedureColumns
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a list of parameter and result columns for the stored procedures belonging to a specified catalog.The list is returned as a
ResultSetwith one row for each parameter or result column. The data is ordered byPROCEDURE_SCHEMandPROCEDURE_NAME, while for each procedure, the return value (if any) is first, followed by the parameters in the order they appear in the stored procedure call, followed byResultSetcolumns in column number order. Each row has the following structure:PROCEDURE_CAT- String - the procedure catalog namePROCEDURE_SCHEM- String - the procedure schema name (possibly null)PROCEDURE_NAME- String - the procedure nameCOLUMN_NAME- String - the name of the columnCOLUMN_TYPE- short - the kind of column or parameter, as follows:DatabaseMetaData.procedureColumnUnknown- type unknownDatabaseMetaData.procedureColumnIn- anINparameterDatabaseMetaData.procedureColumnInOut- anINOUTparameterDatabaseMetaData.procedureColumnOut- anOUTparameterDatabaseMetaData.procedureColumnReturn- a return valueDatabaseMetaData.procedureReturnsResult- a result column in a result set
DATA_TYPE- int - the SQL type of the data, as injava.sql.TypesTYPE_NAME- String - the SQL type name, for a UDT it is fully qualifiedPRECISION- int - the precisionLENGTH- int - the length of the data in bytesSCALE- short - the scale for numeric typesRADIX- short - the Radix for numeric data (typically 2 or 10)NULLABLE- short - can the data containnull:DatabaseMetaData.procedureNoNulls-NULLs not permittedDatabaseMetaData.procedureNullable-NULLs are permittedDatabaseMetaData.procedureNullableUnknown-NULLstatus unknown
REMARKS- String - an explanatory comment about the data item
- Specified by:
getProcedureColumnsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.procedureNamePattern- a pattern that must match the name of the procedure stored in the database.columnNamePattern- a column name pattern. The name must match the column name stored in the database.- Returns:
- a
ResultSetwith the list of parameter and result columns in the format defined above. - Throws:
SQLException- a database error occurred.
-
getTables
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a description of the tables in a specified catalog.The descriptions are returned as rows in a
ResultSet, one row for each Table. The ResultSet is ordered byTABLE_TYPE,TABLE_SCHEMandTABLE_NAME. Each row in the ResultSet consists of a series of columns as follows:TABLE_CAT- String - table catalog name (possiblynull)TABLE_SCHEM- String - Table schema name (possiblynull)TABLE_NAME- String - The table nameTABLE_TYPE- String - Typical names include "TABLE", "VIEW", "SYSTEM TABLE", "ALIAS", "SYNONYM", "GLOBAL TEMPORARY"REMARKS- String - A comment describing the tableTYPE_CAT- String - the 'Types' catalog(possiblynull)TYPE_SCHEM- String - the 'Types' schema(possiblynull)TYPE_NAME- String - the 'Types' name (possiblynull)SELF_REFERENCING_COL_NAME- String - the name of a designated identifier column in a typed table (possiblynull)- REF_GENERATION - String - one of the following values : "SYSTEM" |
"USER" | "DERIVED" - specifies how values in the
SELF_REFERENCING_COL_NAMEare created (possiblynull)
- Specified by:
getTablesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.tableNamePattern- a table name, which should match the table name as stored in the database.types- a list of table types to include in the list.nullimplies list all types.- Returns:
- a
ResultSetwith one row per table in the format defined above. - Throws:
SQLException- a database error occurred.
-
getSchemas
Description copied from interface:DatabaseMetaDataReturns a list of the schema names in the database. The list is returned as aResultSet, ordered by the schema name, with one row per schema in the following format:TABLE_SCHEM- String - the schema nameTABLE_CATALOG- String - the catalog name (possiblynull)
- Specified by:
getSchemasin interfaceDatabaseMetaData- Returns:
- a
ResultSetwith one row for each schema in the format defined above. - Throws:
SQLException- a database error occurred.
-
getCatalogs
Description copied from interface:DatabaseMetaDataReturns the set of catalog names available in this database. The set is returned ordered by catalog name.- Specified by:
getCatalogsin interfaceDatabaseMetaData- Returns:
- a
ResultSetcontaining the catalog names, with each row containing one catalog name (as aString) in the single column namedTABLE_CAT. - Throws:
SQLException- if there is a database error.
-
getTableTypes
Description copied from interface:DatabaseMetaDataReturns a list of table types supported by the database.The list is returned as a
ResultSetwith one row per table type, ordered by the table type. The information in theResultSetis structured into a single column per row, as follows:TABLE_TYPE- String - the table type. Typical names include"TABLE","VIEW", "SYSTEM TABLE","ALIAS","SYNONYM","GLOBAL TEMPORARY"
- Specified by:
getTableTypesin interfaceDatabaseMetaData- Returns:
- a
ResultSetwith one row per table type in the format defined above. - Throws:
SQLException- a database error occurred.
-
getColumns
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a description of table columns available in a specified catalog. Only descriptions meeting the specified catalog, schema, table, and column names are returned.The descriptions are returned as a
ResultSetconforming to the following data layout, with one row per table column:TABLE_CAT- String - the catalog name (possiblynull)TABLE_SCHEM- String - the schema name (possiblynull)TABLE_NAME- String - the table nameCOLUMN_NAME- String - the column nameDATA_TYPE- int - the SQL type as specified injava.sql.TypesTYPE_NAME- String - the name of the data type, (database-dependent, UDT names are fully qualified)COLUMN_SIZE- int - the column size (the precision for numeric types, max characters forcharanddatetypes)BUFFER_LENGTH- int - Not usedDECIMAL_DIGITS- int - maximum number of fractional digitsNUM_PREC_RADIX- int - the radix for numerical typesNULLABLE- int - whether the column allowsnulls:- DatabaseMetaData.columnNoNulls = may not allow
NULLs - DatabaseMetaData.columnNullable = does allow
NULLs - DatabaseMetaData.columnNullableUnknown = unknown
NULLstatus
- DatabaseMetaData.columnNoNulls = may not allow
REMARKS- String - A description of the column (possiblynull)COLUMN_DEF- String - Default value for the column (possiblynull)SQL_DATA_TYPE- int - not usedSQL_DATETIME_SUB- int - not usedCHAR_OCTET_LENGTH- int - maximum number of bytes in thechartype columnsORDINAL_POSITION- int - the column index in the table (1 based)IS_NULLABLE- String -"NO"= column does not allow NULLs,"YES"= column allows NULLs, "" =NULLstatus unknownSCOPE_CATALOG- String - if theDATA_TYPEisREF, this gives the catalog of the table corresponding to the attribute's scope. NULL if theDATA_TYPEis not REF.SCOPE_SCHEMA- String - if theDATA_TYPEisREF, this gives the schema of the table corresponding to the attribute's scope. NULL if theDATA_TYPEis not REF.SCOPE_TABLE- String - if theDATA_TYPEisREF, this gives the name of the table corresponding to the attribute's scope. NULL if theDATA_TYPEis not REF.SOURCE_DATA_TYPE- String - The source type for a user generated REF type or for a Distinct type. (NULLifDATA_TYPEis not DISTINCT or a user generated REF)
- Specified by:
getColumnsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.tableNamePattern- the table name. This must match the name of the table as declared in the database.columnNamePattern- the column name. This must match the name of a column in the table in the database.- Returns:
- the descriptions as a
ResultSetwith rows in the form defined above. - Throws:
SQLException- if there is a database error.
-
getColumnPrivileges
public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a description of access rights for a table's columns. Only access rights matching the criteria for the column name are returned.The description is returned as a
ResultSetwith rows of data for each access right, with columns as follows:TABLE_CAT- String - the catalog name (possiblynull)TABLE_SCHEM- String - the schema name (possiblynull)TABLE_NAME- String - the table nameCOLUMN_NAME- String - the Column nameGRANTOR- String - the grantor of access (possiblynull)PRIVILEGE- String - Access right - one of SELECT, INSERT, UPDATE, REFERENCES,...IS_GRANTABLE- String -"YES"implies that the receiver can grant access to others,"NO"if the receiver cannot grant access to others,nullif unknown.
- Specified by:
getColumnPrivilegesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schema- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.table- the table name. This must match the name of the table as declared in the database.columnNamePattern- the column name. This must match the name of a column in the table in the database.- Returns:
- a
ResultSetcontaining the access rights, one row for each privilege description. - Throws:
SQLException- if there is a database error.
-
getTablePrivileges
public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a description of access rights for each table present in a catalog. Table privileges can apply to one or more columns in the table - but are not guaranteed to apply to all columns.The privileges are returned as a
ResultSet, with one row for each privilege, ordered byTABLE_SCHEM,TABLE_NAME,PRIVILEGE, and each row has data as defined in the following column definitions:TABLE_CAT- String - table catalog name (possiblynull)TABLE_SCHEM- String - Table schema name (possiblynull)TABLE_NAME- String - The table name- GRANTOR - String - who granted the access
- GRANTEE - String - who received the access grant
- PRIVILEGE - String - the type of access granted - one of SELECT, INSERT, UPDATE, REFERENCES,...
- IS_GRANTABLE - String -
"YES"implies the grantee can grant access to others,"NO"implies guarantee cannot grant access to others,nullmeans this status is unknown
- Specified by:
getTablePrivilegesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.tableNamePattern- a Table Name, which should match the table name as stored in the database.- Returns:
- a
ResultSetcontaining a list with one row for each table in the format defined above. - Throws:
SQLException- a database error occurred.
-
getBestRowIdentifier
public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a list of a table's optimal set of columns that uniquely identify the rows. The results are ordered bySCOPE(see below).The results are returned as a table, with one entry for each column, as follows:
SCOPE- short - theSCOPEof the result, as follows:DatabaseMetaData.bestRowTemporary- the result is very temporary, only valid while on the current rowDatabaseMetaData.bestRowTransaction- the result is good for remainder of current transactionDatabaseMetaData.bestRowSession- the result is good for remainder of database session
COLUMN_NAME- String - the column nameDATA_TYPE- int - the Type of the data, as defined injava.sql.TypesTYPE_NAME- String - the Name of the type - database dependent. For UDT types the name is fully qualifiedCOLUMN_SIZE- int - the precision of the data in the columnBUFFER_LENGTH- int - not usedDECIMAL_DIGITS- short - number of fractional digitsPSEUDO_COLUMN- short - whether this is a pseudo column (e.g. an OracleROWID):DatabaseMetaData.bestRowUnknown- it is not known whether this is a pseudo columnDatabaseMetaData.bestRowNotPseudo- the column is not pseudoDatabaseMetaData.bestRowPseudo- the column is a pseudo column
- Specified by:
getBestRowIdentifierin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schema- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.table- the table name. This must match the name of the table as declared in the database.scope- theSCOPEof interest, values as defined above.nullable-true= include columns that are nullable,false= do not include nullable columns.- Returns:
- a
ResultSetwhere each row is a description of a column and the complete set of rows is the optimal set for this table. - Throws:
SQLException- if there is a database error.
-
getVersionColumns
public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns which of a table's columns are automatically updated when any value in a row is updated.The result is laid-out in the following columns:
SCOPE- short - not usedCOLUMN_NAME- String - Column nameDATA_TYPE- int - The SQL data type, as defined injava.sql.TypesTYPE_NAME- String - The SQL type name, data source dependentCOLUMN_SIZE- int - Precision for numeric typesBUFFER_LENGTH- int - Length of a column value in bytesDECIMAL_DIGITS- short - Number of digits after the decimal pointPSEUDO_COLUMN- short - If this is a pseudo-column (for example, an OracleROWID):DatabaseMetaData.bestRowUnknown- don't know whether this is a pseudo columnDatabaseMetaData.bestRowNotPseudo- column is not pseudoDatabaseMetaData.bestRowPseudo- column is a pseudo column
- Specified by:
getVersionColumnsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search using catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schema- a schema name pattern.nullis used to imply no narrowing of the search using schema names. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.table- a table name. It must match the name of a table in the database.- Returns:
- a
ResultSetcontaining the descriptions, one row for each column, in the format defined above. - Throws:
SQLException- a database error occurred.
-
getPrimaryKeys
Description copied from interface:DatabaseMetaDataReturns a list of the primary key columns of a specified table.The list is returned as a
ResultSetwith one row for each primary key column, ordered byCOLUMN_NAME, with each row having the structure as follows:TABLE_CAT- String - table catalog name (possibly null)TABLE_SCHEM- String - table schema name (possibly null)TABLE_NAME- String - The table nameCOLUMN_NAME- String - The column nameKEY_SEQ- short - the sequence number for this column in the primary keyPK_NAME- String - the primary key name (possibly null)
- Specified by:
getPrimaryKeysin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with the empty string used to retrieve those without a catalog name.schema- a schema name.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with the empty string used to retrieve those without a schema name.table- the name of a table, which must match the name of a table in the database.- Returns:
- a
ResultSetcontaining the list of keys in the format defined above. - Throws:
SQLException- a database error occurred.
-
getImportedKeys
Description copied from interface:DatabaseMetaDataReturns a list columns in a table that are both primary keys and referenced by the table's foreign key columns (that is, the primary keys imported by a table).The list returned is a
ResultSetwith a row entry for each primary key column, ordered byPKTABLE_CAT,PKTABLE_SCHEM,PKTABLE_NAME, andKEY_SEQ, with the following format:PKTABLE_CAT- String - primary key catalog name being imported (possiblynull)PKTABLE_SCHEM- String - primary key schema name being imported (possiblynull)PKTABLE_NAME- String - primary key table name being importedPKCOLUMN_NAME- String - primary key column name being importedFKTABLE_CAT- String - foreign key table catalog name (possiblynull)FKTABLE_SCHEM- String - foreign key table schema name (possiblynull)FKTABLE_NAME- String - foreign key table nameFKCOLUMN_NAME- String - foreign key column nameKEY_SEQ- short - sequence number (in the foreign key)UPDATE_RULE- short - how to treat the foreign key when the corresponding primary key is updated:DatabaseMetaData.importedKeyNoAction- don't allow any update of the primary key if it is imported as a foreign keyDatabaseMetaData.importedKeyCascade- change imported key to match the primary key updateDatabaseMetaData.importedKeySetNull- set the imported key tonullDatabaseMetaData.importedKeySetDefault- set the imported key to its default valueDatabaseMetaData.importedKeyRestrict- same as importedKeyNoAction
DELETE_RULE- short - how to treat the foreign key when the corresponding primary key is deleted:DatabaseMetaData.importedKeyNoAction- don't allow the primary key to be deleted if it is imported as a foreign keyDatabaseMetaData.importedKeyCascade- delete those rows that import a deleted keyDatabaseMetaData.importedKeySetNull- set the imported key tonullDatabaseMetaData.importedKeySetDefault- set the imported key to its default valueDatabaseMetaData.importedKeyRestrict- same asimportedKeyNoAction
FK_NAME- String - foreign key name (possiblynull)PK_NAME- String - primary key name (possiblynull)DEFERRABILITY- short - defines whether foreign key constraints can be deferred until commit (see SQL92 specification for definitions):DatabaseMetaData.importedKeyInitiallyDeferredDatabaseMetaData.importedKeyInitiallyImmediateDatabaseMetaData.importedKeyNotDeferrable
- Specified by:
getImportedKeysin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schema- a schema name.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.table- a table name, which must match the name of a table in the database.- Returns:
- a
ResultSetcontaining the list of primary key columns as rows in the format defined above. - Throws:
SQLException- a database error occurred.
-
getExportedKeys
Description copied from interface:DatabaseMetaDataReturns a list of the foreign key columns that reference the primary key columns of a specified table (the foreign keys exported by a table).The list is returned as a
ResultSetwith a row for each of the foreign key columns, ordered byFKTABLE_CAT,FKTABLE_SCHEM,FKTABLE_NAME, andKEY_SEQ, with the format for each row being:PKTABLE_CAT- String - from the primary key table : the catalog (possiblynull)PKTABLE_SCHEM- String - from the primary key table : the schema (possiblynull)PKTABLE_NAME- String - from the primary key table : the namePKCOLUMN_NAME- String - from the primary key column : the nameFKTABLE_CAT- String - from the foreign key table : the catalog name being exported (possiblynull)FKTABLE_SCHEM- String - from the foreign key table : the schema name being exported (possiblynull)FKTABLE_NAME- String - from the foreign key table : the name being exportedFKCOLUMN_NAME- String - from the foreign key column : the name being exportedKEY_SEQ- short - the sequence number (in the foreign key)UPDATE_RULE- short - a value giving the rule for how to treat the foreign key when the corresponding primary key is updated:DatabaseMetaData.importedKeyNoAction- don't allow the primary key to be updated if it is imported as a foreign keyDatabaseMetaData.importedKeyCascade- change the imported key to match the primary key updateDatabaseMetaData.importedKeySetNull- set the imported key tonullDatabaseMetaData.importedKeySetDefault- set the imported key to its default valueDatabaseMetaData.importedKeyRestrict- same as importedKeyNoAction
DELETE_RULE- short - how to treat the foreign key when the corresponding primary key is deleted:DatabaseMetaData.importedKeyNoAction- don't allow the primary key to be deleted if it is imported as a foreign keyDatabaseMetaData.importedKeyCascade- the deletion should also delete rows that import a deleted keyDatabaseMetaData.importedKeySetNull- the deletion sets the imported key tonullDatabaseMetaData.importedKeySetDefault- the deletion sets the imported key to its default valueDatabaseMetaData.importedKeyRestrict- same as importedKeyNoAction
FK_NAME- String - the foreign key name (possiblynull)PK_NAME- String - the primary key name (possiblynull)DEFERRABILITY- short - defines whether the foreign key constraints can be deferred until commit (see the SQL92 specification for definitions):DatabaseMetaData.importedKeyInitiallyDeferredDatabaseMetaData.importedKeyInitiallyImmediateDatabaseMetaData.importedKeyNotDeferrable
- Specified by:
getExportedKeysin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schema- a schema name.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.table- a table name, which must match the name of a table in the database- Returns:
- a
ResultSetcontaining a row for each of the foreign key columns, as defined above - Throws:
SQLException- a database error occurred
-
getCrossReference
public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a list of foreign key columns in a given foreign key table that reference the primary key columns of a supplied primary key table. This describes how one table imports the key of another table. It would be expected to return a single foreign key - primary key pair in most cases.The descriptions are returned as a
ResultSetwith one row for each foreign key, with the following layout:PKTABLE_CAT- String - from the primary key table : Catalog (possiblynull)PKTABLE_SCHEM- String - from the primary key table : Schema (possiblynull)PKTABLE_NAME- String - from the primary key table : namePKCOLUMN_NAME- String - from the primary key column : nameFKTABLE_CAT- String - from the foreign key table : the catalog name being exported (possiblynull)FKTABLE_SCHEM- String - from the foreign key table : the schema name being exported (possiblynull)FKTABLE_NAME- String - from the foreign key table : the name being exportedFKCOLUMN_NAME- String - from the foreign key column : the name being exportedKEY_SEQ- short - the sequence number (in the foreign key)UPDATE_RULE- short - a value giving the rule for how to treat the corresponding foreign key when a primary key is updated:DatabaseMetaData.importedKeyNoAction- don't allow the primary key to be updated if it is imported as a foreign keyDatabaseMetaData.importedKeyCascade- change the imported key to match the updated primary keyDatabaseMetaData.importedKeySetNull- set the imported key tonullDatabaseMetaData.importedKeySetDefault- set the imported key to its default valueDatabaseMetaData.importedKeyRestrict- same asimportedKeyNoAction
DELETE_RULE- short - a value giving the rule for how to treat the foreign key when the corresponding primary key is deleted:DatabaseMetaData.importedKeyNoAction- don't allow the primary key to be deleted if it is imported as a foreign keyDatabaseMetaData.importedKeyCascade- delete those rows that import a deleted keyDatabaseMetaData.importedKeySetNull- set the imported key tonullDatabaseMetaData.importedKeySetDefault- set the imported key to its default valueDatabaseMetaData.importedKeyRestrict- same as importedKeyNoAction
FK_NAME- String - the foreign key name (possiblynull)PK_NAME- String - the primary key name (possiblynull)DEFERRABILITY- short - whether foreign key constraints can be deferred until commit (see the SQL92 specification for definitions):DatabaseMetaData.importedKeyInitiallyDeferredDatabaseMetaData.importedKeyInitiallyImmediateDatabaseMetaData.importedKeyNotDeferrable
- Specified by:
getCrossReferencein interfaceDatabaseMetaData- Parameters:
primaryCatalog- a catalog name for the primary key table.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.primarySchema- a schema name for the primary key table.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.primaryTable- the name of the table which exports the key. It must match the name of the table in the database.foreignCatalog- a catalog name for the foreign key table.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.foreignSchema- a schema name for the foreign key table.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.foreignTable- the name of the table importing the key. It must match the name of the table in the database.- Returns:
- a
ResultSetcontaining rows with the descriptions of the foreign keys laid out according to the format defined above. - Throws:
SQLException- if there is a database error.
-
getTypeInfo
Description copied from interface:DatabaseMetaDataGet a list of the standard SQL types supported by this database. The list is returned as aResultSet, with one row for each type, ordered by theDATA_TYPEvalue, where the data in each row is structured into the following columns:TYPE_NAME- String : the type nameDATA_TYPE- int : the SQL data type value as defined injava.sql.TypesPRECISION- int - the maximum precision of the typeLITERAL_PREFIX- String : the prefix to be used when quoting a literal value (possiblynull)LITERAL_SUFFIX- String : the suffix to be used when quoting a literal value (possiblynull)CREATE_PARAMS- String : params used when creating the type (possiblynull)NULLABLE- short : shows if the value is nullable:DatabaseMetaData.typeNoNulls:NULLs not permittedDatabaseMetaData.typeNullable:NULLs are permittedDatabaseMetaData.typeNullableUnknown:NULLstatus unknown
CASE_SENSITIVE- boolean : true if the type is case sensitiveSEARCHABLE- short : how this type can be used withWHEREclauses:DatabaseMetaData.typePredNone-WHEREclauses cannot be usedDatabaseMetaData.typePredChar- support forWHERE...LIKEonlyDatabaseMetaData.typePredBasic- support except forWHERE...LIKEDatabaseMetaData.typeSearchable- support for allWHEREclauses
UNSIGNED_ATTRIBUTE- boolean - the type is unsigned or notFIXED_PREC_SCALE- boolean - fixed precision = it can be used as a money valueAUTO_INCREMENT- boolean - can be used as an auto-increment valueLOCAL_TYPE_NAME- String - a localized version of the type name (possiblynull)MINIMUM_SCALE- short - the minimum scale supportedMAXIMUM_SCALE- short - the maximum scale supportedSQL_DATA_TYPE- int - not usedSQL_DATETIME_SUB- int - not usedNUM_PREC_RADIX- int - number radix (typically 2 or 10)
- Specified by:
getTypeInfoin interfaceDatabaseMetaData- Returns:
- a
ResultSetwhich is structured as described above. - Throws:
SQLException- a database error occurred.
-
getIndexInfo
public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a list of indices and statistics for a specified table.The list is returned as a
ResultSet, with one row for each index or statistic. The list is ordered byNON_UNIQUE,TYPE,INDEX_NAME, andORDINAL_POSITION. Each row has the following format:TABLE_CAT- String - table catalog name (possiblynull)TABLE_SCHEM- String - table schema name (possiblynull)TABLE_NAME- String - The table nameNON_UNIQUE- boolean -truewhen index values can be non-unique. Must befalsewhen the TYPE is tableIndexStatisticINDEX_QUALIFIER- String : index catalog name.nullwhen the TYPE is 'tableIndexStatistic'INDEX_NAME- String : index name.nullwhen TYPE is 'tableIndexStatistic'TYPE- short - the index type. One of:DatabaseMetaData.tableIndexStatistic- table statistics returned with Index descriptionsDatabaseMetaData.tableIndexClustered- a clustered IndexDatabaseMetaData.tableIndexHashed- a hashed IndexDatabaseMetaData.tableIndexOther- other style of Index
ORDINAL_POSITION- short - column sequence within Index. 0 when TYPE is tableIndexStatisticCOLUMN_NAME- String - the column name.nullwhen TYPE is tableIndexStatisticASC_OR_DESC- String - column sort sequence.nullif sequencing not supported or TYPE is tableIndexStatistic; otherwise "A" means sort ascending and "D" means sort descending.CARDINALITY- int - Number of unique values in the Index. If TYPE is tableIndexStatistic, this is number of rows in the table.PAGES- int - Number of pages for current Index. If TYPE is tableIndexStatistic, this is number of pages used for the table.FILTER_CONDITION- String - Filter condition. (possibly null)
- Specified by:
getIndexInfoin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schema- a schema name.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.table- a table name, which must match the name of a table in the database.unique-truemeans only return indices for unique values,falseimplies that they can be returned even if not unique.approximate-trueimplies that the list can contain approximate or "out of data" values,falseimplies that all values must be precisely accurate- Returns:
- a
ResultSetcontaining the list of indices and statistics for the table, in the format defined above. - Throws:
SQLException- a database error occurred.
-
supportsResultSetType
Description copied from interface:DatabaseMetaDataDetermines whether the suppliedResultSettype is supported.- Specified by:
supportsResultSetTypein interfaceDatabaseMetaData- Parameters:
type- theResultSettype as defined injava.sql.ResultSet:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif theResultSettype is supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
supportsResultSetConcurrency
Description copied from interface:DatabaseMetaDataDetermines whether there is support for a given concurrency style for the givenResultSet.- Specified by:
supportsResultSetConcurrencyin interfaceDatabaseMetaData- Parameters:
type- theResultSettype, as defined injava.sql.ResultSet:ResultSet.TYPE_FORWARD_ONLYResultSet.TYPE_SCROLL_INSENSITIVEResultSet.TYPE_SCROLL_SENSITIVE
concurrency- a concurrency type, which may be one ofResultSet.CONCUR_READ_ONLYorResultSet.CONCUR_UPDATABLE.- Returns:
trueif that concurrency andResultSettype pairing is supported otherwisefalse.- Throws:
SQLException- a database error occurred.
-
ownUpdatesAreVisible
Description copied from interface:DatabaseMetaDataDetermines whether aResultSetcan see its own updates, for a specifiedResultSettype.- Specified by:
ownUpdatesAreVisiblein interfaceDatabaseMetaData- Parameters:
type- the type of theResultSet:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif the updates are seen by theResultSetitself, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
ownDeletesAreVisible
Description copied from interface:DatabaseMetaDataDetermines whether aResultSetcan see its own deletes, for a specifiedResultSettype.- Specified by:
ownDeletesAreVisiblein interfaceDatabaseMetaData- Parameters:
type- the type of theResultSet:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif the deletes are seen by theResultSetitself, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
ownInsertsAreVisible
Description copied from interface:DatabaseMetaDataDetermines whether aResultSetcan see its own inserts, for a specifiedResultSettype.- Specified by:
ownInsertsAreVisiblein interfaceDatabaseMetaData- Parameters:
type- the type of theResultSet:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif the inserts are seen by theResultSetitself, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
othersUpdatesAreVisible
Description copied from interface:DatabaseMetaDataDetermines whether updates made by others are visible, for a specifiedResultSettype.- Specified by:
othersUpdatesAreVisiblein interfaceDatabaseMetaData- Parameters:
type- the type of theResultSet. May beResultSet.TYPE_FORWARD_ONLY, orResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif others' inserts are visible, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
othersDeletesAreVisible
Description copied from interface:DatabaseMetaDataDetermines whether deletes made by others are visible, for a specifiedResultSettype.- Specified by:
othersDeletesAreVisiblein interfaceDatabaseMetaData- Parameters:
type- the type of theResultSet. It may be eitherResultSet.TYPE_FORWARD_ONLYorResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE)- Returns:
trueif others' deletes are visible,falseotherwise.- Throws:
SQLException- a database error occurred.
-
othersInsertsAreVisible
Description copied from interface:DatabaseMetaDataDetermines whether inserts made by others are visible, for a specifiedResultSettype.- Specified by:
othersInsertsAreVisiblein interfaceDatabaseMetaData- Parameters:
type- the type of theResultSet. May beResultSet.TYPE_FORWARD_ONLY, orResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif others' inserts are visible, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
updatesAreDetected
Description copied from interface:DatabaseMetaDataDetermines whether the methodResultSet.rowUpdatedcan detect a visible row update for the specifiedResultSettype.- Specified by:
updatesAreDetectedin interfaceDatabaseMetaData- Parameters:
type-ResultSettype:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
truedetecting changes is possible, otherwisefalse.- Throws:
SQLException- a database error occurred.
-
deletesAreDetected
Description copied from interface:DatabaseMetaDataReturns whether a visible row delete can be detected by callingResultSet.rowDeleted().- Specified by:
deletesAreDetectedin interfaceDatabaseMetaData- Parameters:
type- the type of theResultSetinvolved:ResultSet.TYPE_FORWARD_ONLY,ResultSet.TYPE_SCROLL_INSENSITIVE, orResultSet.TYPE_SCROLL_SENSITIVE- Returns:
trueif the visible row delete can be detected,falseotherwise.- Throws:
SQLException- if there is a database error.
-
insertsAreDetected
Description copied from interface:DatabaseMetaDataDetermines whether a visible row insert can be detected by callingResultSet.rowInserted.- Specified by:
insertsAreDetectedin interfaceDatabaseMetaData- Parameters:
type- theResultSettype. This may be one ofResultSet.TYPE_SCROLL_SENSITIVEorResultSet.TYPE_SCROLL_INSENSITIVEorResultSet.TYPE_FORWARD_ONLY,- Returns:
trueifResultSet.rowInserteddetects a visible row insert otherwisefalse.- Throws:
SQLException- a database error occurred.- See Also:
ResultSet.rowInserted()
-
supportsBatchUpdates
Description copied from interface:DatabaseMetaDataDetermines whether the database supports batch updates.- Specified by:
supportsBatchUpdatesin interfaceDatabaseMetaData- Returns:
trueif batch updates are supported,falseotherwise.- Throws:
SQLException- a database error occurred.
-
getUDTs
public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a description of the User Defined Types (UDTs) defined in a given schema, which includes the typesDISTINCT,STRUCTandJAVA_OBJECT.The types matching the supplied the specified catalog, schema, type name and type are returned as rows in a
ResultSetwith columns of information as follows:TABLE_CAT- String - catalog name (possiblynull)TABLE_SCHEM- String - schema name (possiblynull)TABLE_NAME- String - The table nameCLASS_NAME- String - The Java class nameDATA_TYPE- int - The SQL type as specified injava.sql.Types. One of DISTINCT, STRUCT, and JAVA_OBJECTREMARKS- String - A comment which describes the typeBASE_TYPE- short - A type code. For a DISTINCT type, the source type. For a structured type this is the type that implements the user generated reference type of theSELF_REFERENCING_COLUMN. This is defined injava.sql.Types, and will benullif theDATA_TYPEdoes not match these criteria.
If the driver does not support UDTs, the
ResultSetis empty.- Specified by:
getUDTsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search using schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.typeNamePattern- a type name pattern, which should match a type name as stored in the database. It may be fully qualified.types- a list of the UDT types to include in the list - one ofDISTINCT,STRUCTorJAVA_OBJECT.- Returns:
- a
ResultSetin the format described above. - Throws:
SQLException- a database error occurred.
-
getConnection
Description copied from interface:DatabaseMetaDataReturns the database connection that created this metadata.- Specified by:
getConnectionin interfaceDatabaseMetaData- Returns:
- the connection to the database.
- Throws:
SQLException- if there is a database error.
-
supportsSavepoints
public boolean supportsSavepoints()Description copied from interface:DatabaseMetaDataDetermines whether savepoints for transactions are supported.- Specified by:
supportsSavepointsin interfaceDatabaseMetaData- Returns:
trueif savepoints are supported,falseotherwise.
-
supportsNamedParameters
public boolean supportsNamedParameters()Description copied from interface:DatabaseMetaDataDetermines whether callable statements with named parameters is supported.- Specified by:
supportsNamedParametersin interfaceDatabaseMetaData- Returns:
trueif named parameters can be used with callable statements,falseotherwise.
-
supportsMultipleOpenResults
public boolean supportsMultipleOpenResults()Description copied from interface:DatabaseMetaDataDetermines whether it is possible for a singleCallableStatementto return multipleResultSets simultaneously.- Specified by:
supportsMultipleOpenResultsin interfaceDatabaseMetaData- Returns:
trueif a singleCallableStatementcan return multipleResultSets simultaneously,falseotherwise.
-
supportsGetGeneratedKeys
public boolean supportsGetGeneratedKeys()Description copied from interface:DatabaseMetaDataDetermines whether auto generated keys can be returned when a statement executes.- Specified by:
supportsGetGeneratedKeysin interfaceDatabaseMetaData- Returns:
trueif auto generated keys can be returned,falseotherwise.
-
supportsResultSetHoldability
public boolean supportsResultSetHoldability(int x)Description copied from interface:DatabaseMetaDataDetermines whether the suppliedResultSetholdability mode is supported.- Specified by:
supportsResultSetHoldabilityin interfaceDatabaseMetaData- Parameters:
x- as specified injava.sql.ResultSet:ResultSet.HOLD_CURSORS_OVER_COMMITorResultSet.CLOSE_CURSORS_AT_COMMIT- Returns:
trueif the given ResultSet holdability is supported and if it isn't thenfalse.
-
supportsStatementPooling
public boolean supportsStatementPooling()Description copied from interface:DatabaseMetaDataDetermines whether statement pooling is supported.- Specified by:
supportsStatementPoolingin interfaceDatabaseMetaData- Returns:
trueof the database does support statement pooling, otherwisefalse.
-
locatorsUpdateCopy
Description copied from interface:DatabaseMetaDataDetermines whether updates are made to a copy of, or directly on, Large Objects (LOBs).- Specified by:
locatorsUpdateCopyin interfaceDatabaseMetaData- Returns:
trueif updates are made to a copy of the Large Object,falseotherwise.- Throws:
SQLException- a database error occurred.
-
getSuperTypes
public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns the User Defined Type (UDT) hierarchies for a given schema. Only the immediate parent/child relationship is described. If a UDT does not have a direct supertype, it is not listed.The listing is returned as a
ResultSetwhere there is one row for a specific UDT which describes its supertype, with the data organized in columns as follows:TYPE_CAT- String - the UDT catalog name (possiblynull)TYPE_SCHEM- String - the UDT schema name (possiblynull)TYPE_NAME- String - the UDT type name- SUPER
TYPE_CAT- String - direct supertype's catalog name (possiblynull) - SUPER
TYPE_SCHEM- String - direct supertype's schema name (possiblynull) - SUPER
TYPE_NAME- String - direct supertype's name
- Specified by:
getSuperTypesin interfaceDatabaseMetaData- Parameters:
catalog- the catalog name. "" means get the UDTs without a catalog.nullmeans don't use the catalog name to restrict the search.schemaPattern- the Schema pattern name. "" means get the UDT's without a schema.typeNamePattern- the UDT name pattern. This may be a fully qualified name. When a fully qualified name is specified, the catalog name and schema name parameters are ignored.- Returns:
- a
ResultSetin which each row gives information about a particular UDT in the format defined above. An empty ResultSet is returned for a database that does not support type hierarchies. - Throws:
SQLException- a database error occurred.
-
getSuperTables
public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a listing of the hierarchies of tables in a specified schema in the database.The listing only contains entries for tables that have a super table. Super tables and corresponding subtables must be defined in the same catalog and schema. The list is returned as a
ResultSet, with one row for each table that has a super table, in the following format:TABLE_CAT- String - table catalog name (possiblynull)TABLE_SCHEM- String - Table schema name (possiblynull)TABLE_NAME- String - The table name- SUPER
TABLE_NAME- String - The super table name
- Specified by:
getSuperTablesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.tableNamePattern- a table name, which should match the table name as stored in the database. it may be a fully qualified name. If it is fully qualified the catalog name and schema name parameters are ignored.- Returns:
- a
ResultSetwith one row for each table which has a super table, in the format defined above. An emptyResultSetis returned if the database does not support table hierarchies. - Throws:
SQLException- a database error occurred.
-
getAttributes
public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns aResultSetdescribing a subset of the attributes of a specified SQL User Defined Type (UDT) for a specified schema and catalog. The subset is determined by restricting to those attributes whose name matches theattributeNamePatternand whose type name matches thetypeNamePattern. Each row of theResultSetdescribes one attribute, and the rows are ordered by the columnsTYPE_SCHEM,TYPE_NAMEandORDINAL_POSITION. Inherited attributes are not included.The columns of the returned
ResultSetobject have the following names and meanings:TYPE_CAT- String - the type catalog name (possiblynull)TYPE_SCHEM- String - the type schema name (possiblynull)TYPE_NAME- String - the type nameATTR_NAME- String - the attribute nameDATA_TYPE- int - the attribute type as defined injava.sql.TypesATTR_TYPE_NAME- String - the attribute type name. This depends on the data source. For aUDTthe name is fully qualified. For aREFit is both fully qualified and represents the target type of the reference.ATTR_SIZE- int - the column size. When referring to char and date types this value is the maximum number of characters. When referring to numeric types is is the precision.DECIMAL_DIGITS- int - how many fractional digits are supportedNUM_PREC_RADIX- int - numeric values radixNULLABLE- int - whetherNULLis permitted:- DatabaseMetaData.attributeNoNulls -
NULLvalues not permitted - DatabaseMetaData.attributeNullable -
NULLvalues definitely permitted - DatabaseMetaData.attributeNullableUnknown - unknown
- DatabaseMetaData.attributeNoNulls -
REMARKS- String - a comment describing the attribute (possiblynull)- ATTR_DEF - String - Default value for the attribute (possibly
null) SQL_DATA_TYPE- int - not used- SQL_DATETIME_SUB - int - not used
- CHAR_OCTET_LENGTH - int - for
CHARtypes, the max number of bytes in the column - ORDINAL_POSITION - int - The index of the column in the table (where the count starts from 1, not 0)
- IS_NULLABLE - String -
"NO"= the column does not allowNULLs,"YES"= the column allowsNULLs, "" = status unknown SCOPE_CATALOG- String - if theDATA_TYPEisREF, this gives the catalog of the table corresponding to the attribute's scope. NULL if theDATA_TYPEis not REF.SCOPE_SCHEMA- String - if theDATA_TYPEisREF, this gives the schema of the table corresponding to the attribute's scope. NULL if theDATA_TYPEis not REF.SCOPE_TABLE- String - if theDATA_TYPEisREF, this gives the name of the table corresponding to the attribute's scope. NULL if theDATA_TYPEis not REF.SOURCE_DATA_TYPE- String - The source type for a user generated REF type or for a Distinct type. (NULLifDATA_TYPEis not DISTINCT or a user generated REF)
- Specified by:
getAttributesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name.nullis used to imply no narrowing of the search by catalog name. Otherwise, the name must match a catalog name held in the database, with "" used to retrieve those without a catalog name.schemaPattern- a schema name pattern.nullis used to imply no narrowing of the search by a schema name. Otherwise, the name must match a schema name in the database, with "" used to retrieve those without a schema name.typeNamePattern- a type name. This pattern must match the type name stored in the database.attributeNamePattern- an Attribute name. This pattern must match the attribute name as stored in the database.- Returns:
- a
ResultSet, where each row is an attribute description. - Throws:
SQLException- if there is a database error.
-
getResultSetHoldability
Description copied from interface:DatabaseMetaDataReturns the result set's default holdability.- Specified by:
getResultSetHoldabilityin interfaceDatabaseMetaData- Returns:
- one of
ResultSet.HOLD_CURSORS_OVER_COMMITorResultSet.CLOSE_CURSORS_AT_COMMIT. - Throws:
SQLException- a database error occurred.
-
getDatabaseMajorVersion
public int getDatabaseMajorVersion()Description copied from interface:DatabaseMetaDataReturns the major version number of the database software.- Specified by:
getDatabaseMajorVersionin interfaceDatabaseMetaData- Returns:
- the major version number of the database software.
-
getDatabaseMinorVersion
public int getDatabaseMinorVersion()Description copied from interface:DatabaseMetaDataReturns the minor version number of the database software.- Specified by:
getDatabaseMinorVersionin interfaceDatabaseMetaData- Returns:
- the minor version number of the database software.
-
getJDBCMajorVersion
public int getJDBCMajorVersion()Description copied from interface:DatabaseMetaDataReturns this driver's major JDBC version number.- Specified by:
getJDBCMajorVersionin interfaceDatabaseMetaData- Returns:
- the major JDBC version number.
-
getJDBCMinorVersion
public int getJDBCMinorVersion()Description copied from interface:DatabaseMetaDataReturns the minor JDBC version number for this driver.- Specified by:
getJDBCMinorVersionin interfaceDatabaseMetaData- Returns:
- the Minor JDBC Version Number.
-
getSQLStateType
Description copied from interface:DatabaseMetaDataStates the type ofSQLStatevalue returned bySQLException.getSQLState. This can either be the X/Open (now known as Open Group) SQL CLI form or the SQL99 form.- Specified by:
getSQLStateTypein interfaceDatabaseMetaData- Returns:
- an integer, which is either
DatabaseMetaData.sqlStateSQL99orDatabaseMetaData.sqlStateXOpen. - Throws:
SQLException- a database error occurred.
-
getRowIdLifetime
Description copied from interface:DatabaseMetaDataReturns the lifetime for which a RowId object remains valid if this data source supports the SQL ROWID type- Specified by:
getRowIdLifetimein interfaceDatabaseMetaData- Returns:
- the time of a RowId object that remains valid.
- Throws:
SQLException- if any error occurs
-
getSchemas
Description copied from interface:DatabaseMetaDataReturns the schema names ordered by TABLE_CATALOG and TABLE_SCHEMA.- Specified by:
getSchemasin interfaceDatabaseMetaData- Parameters:
cat- the catalogschema- the schema pattern- Returns:
- the schema names
- Throws:
SQLException- if any error occurs
-
supportsStoredFunctionsUsingCallSyntax
Description copied from interface:DatabaseMetaDataDetermine if this database supports invoking user-defined or vendor functions using the stored procedure escape syntax.- Specified by:
supportsStoredFunctionsUsingCallSyntaxin interfaceDatabaseMetaData- Returns:
- true if this database supports invoking user-defined or vendor functions using the stored procedure escape syntax.
- Throws:
SQLException- if any error occurs
-
autoCommitFailureClosesAllResultSets
Description copied from interface:DatabaseMetaDataDetermine if a SQLException while autoCommit is true indicates that all open ResultSets are closed, even ones that are holdable- Specified by:
autoCommitFailureClosesAllResultSetsin interfaceDatabaseMetaData- Returns:
- true if all open ResultSets are closed
- Throws:
SQLException- if any error occurs
-
getClientInfoProperties
Description copied from interface:DatabaseMetaDataReturns a list of the client info properties of the driver.- Specified by:
getClientInfoPropertiesin interfaceDatabaseMetaData- Returns:
- a list of the client info
- Throws:
SQLException- if any error occurs
-
getFunctions
Description copied from interface:DatabaseMetaDataReturns a description of the system and user functions available according to the given catalog.- Specified by:
getFunctionsin interfaceDatabaseMetaData- Parameters:
cat- the given catalogschema- the schema patternfunc- the function name pattern- Returns:
- user functions
- Throws:
SQLException- if any error occurs
-
getFunctionColumns
public ResultSet getFunctionColumns(String cat, String schema, String func, String colpat) throws SQLExceptionDescription copied from interface:DatabaseMetaDataReturns a description according to the given catalog's system or user function parameters and return type.- Specified by:
getFunctionColumnsin interfaceDatabaseMetaData- Parameters:
cat- the given catalongschema- the schema patternfunc- the function name patterncolpat- the column name pattern- Returns:
- a description of user functions
- Throws:
SQLException- if any error occurs
-
unwrap
Description copied from interface:WrapperReturns an object that implements the given interface. If the caller is not a wrapper, a SQLException will be thrown.- Specified by:
unwrapin interfaceWrapper- Parameters:
iface- - the class that defines the interface- Returns:
- - an object that implements the interface
- Throws:
SQLException- - if there is no object implementing the specific interface
-
isWrapperFor
Description copied from interface:WrapperIf the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.- Specified by:
isWrapperForin interfaceWrapper- Parameters:
iface- - the class that defines the interface- Returns:
- - true if the instance implements the interface
- Throws:
SQLException- - when an error occurs when judges the object
-