DatabaseMetaDataRepresents the meta data for a database.
boolean allProceduresAreCallable()Checks if all procedures callable.Returns:
true
boolean allTablesAreSelectable()Checks if it possible to query all tables returned by getTables.Returns:
true
boolean autoCommitFailureClosesAllResultSets()Returns whether an exception while auto commit is on closes all result sets.Returns:
false
boolean dataDefinitionCausesTransactionCommit()Returns whether CREATE/DROP commit an open transaction.Returns:
true
boolean dataDefinitionIgnoredInTransactions()Returns whether CREATE/DROP do not affect transactions.Returns:
false
boolean deletesAreDetected(int type)Returns whether deletes are detected.Returns:
false
boolean doesMaxRowSizeIncludeBlobs()Returns whether the maximum row size includes blobs.Returns:
false
ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException[Not supported]ResultSet getBestRowIdentifier(String catalog, String schema, String tableName, int scope, boolean nullable) throws SQLExceptionGets the list of columns that best identifier a row in a table. The list is ordered by SCOPE.
Parameters:
catalog - null (to get all objects) or the catalog name
schema - schema name (must be specified)
tableName - table name (must be specified)
scope - ignored
nullable - ignored
Returns:
the primary key index
Throws:
SQLException - if the connection is closed
String getCatalogSeparator()Returns the catalog separator.Returns:
"."
String getCatalogTerm()Returns the term for "catalog".Returns:
"catalog"
ResultSet getCatalogs() throws SQLExceptionGets the list of catalogs. The result set is sorted by TABLE_CAT.
Returns:
the catalog list
Throws:
SQLException - if the connection is closed
ResultSet getClientInfoProperties() throws SQLException[Not supported] Returns the client info properties.ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLExceptionGets the list of column privileges. The result set is sorted by COLUMN_NAME and PRIVILEGE
Parameters:
catalog - null (to get all objects) or the catalog name
schema - null (to get all objects) or a schema name (uppercase for
unquoted names)
table - a table name (uppercase for unquoted names)
columnNamePattern - null (to get all objects) or a column name
(uppercase for unquoted names)
Returns:
the list of privileges
Throws:
SQLException - if the connection is closed
ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLExceptionGets the list of columns. The result set is sorted by TABLE_SCHEM, TABLE_NAME, and ORDINAL_POSITION.
Parameters:
catalog - null (to get all objects) or the catalog name
schemaPattern - null (to get all objects) or a schema name
(uppercase for unquoted names)
tableNamePattern - null (to get all objects) or a table name
(uppercase for unquoted names)
columnNamePattern - null (to get all objects) or a column name
(uppercase for unquoted names)
Returns:
the list of columns
Throws:
SQLException - if the connection is closed
Connection getConnection()Returns the connection that created this object.Returns:
the connection
ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLExceptionGets the list of foreign key columns that references a table, as well as the list of primary key columns that are references by a table. The result set is sorted by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, FK_NAME, KEY_SEQ.
Parameters:
primaryCatalog - ignored
primarySchema - the schema name of the primary table (must be
specified)
primaryTable - the name of the primary table (must be specified)
foreignCatalog - ignored
foreignSchema - the schema name of the foreign table (must be
specified)
foreignTable - the name of the foreign table (must be specified)
Returns:
the result set
Throws:
SQLException - if the connection is closed
int getDatabaseMajorVersion()Gets the major version of the database.Returns:
the major version
int getDatabaseMinorVersion()Gets the minor version of the database.Returns:
the minor version
String getDatabaseProductName()Gets the database product name.Returns:
the product name
String getDatabaseProductVersion()Gets the product version of the database.Returns:
the product version
int getDefaultTransactionIsolation()Returns the default transaction isolation level.Returns:
Connection.TRANSACTION_READ_COMMITTED
int getDriverMajorVersion()Returns the major version of this driver.Returns:
the major version number
int getDriverMinorVersion()Returns the minor version of this driver.Returns:
the minor version number
String getDriverName()Gets the name of the JDBC driver.Returns:
the driver name
String getDriverVersion()Gets the version number of the driver in the format [MajorVersion].[MinorVersion].Returns:
the version number
ResultSet getExportedKeys(String catalog, String schema, String tableName) throws SQLExceptionGets the list of foreign key columns that reference a table. The result set is sorted by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, FK_NAME, KEY_SEQ.
Parameters:
catalog - null (to get all objects) or the catalog name
schema - the schema name of the primary table
tableName - the name of the primary table
Returns:
the result set
Throws:
SQLException - if the connection is closed
String getExtraNameCharacters()Returns the characters that are allowed for identifiers in addiction to A-Z, a-z, 0-9 and '_'.Returns:
an empty String ("")
String getIdentifierQuoteString()Returns the string used to quote identifiers.Returns:
a double quote
ResultSet getImportedKeys(String catalog, String schema, String tableName) throws SQLExceptionGets the list of primary key columns that are referenced by a table. The result set is sorted by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, FK_NAME, KEY_SEQ.
Parameters:
catalog - null (to get all objects) or the catalog name
schema - the schema name of the foreign table
tableName - the name of the foreign table
Returns:
the result set
Throws:
SQLException - if the connection is closed
ResultSet getIndexInfo(String catalog, String schema, String tableName, boolean unique, boolean approximate) throws SQLExceptionGets the list of indexes for this database. The primary key index (if there is one) is also listed, with the name PRIMARY_KEY. The result set is sorted by NON_UNIQUE ('false' first), TYPE, TABLE_SCHEM, INDEX_NAME, and ORDINAL_POSITION.
Parameters:
catalog - null (to get all objects) or the catalog name
schema - schema name (must be specified)
tableName - table name (must be specified)
unique - only unique indexes
approximate - is ignored
Returns:
the list of indexes and columns
Throws:
SQLException - if the connection is closed
int getJDBCMajorVersion()Gets the major version of the supported JDBC API.Returns:
the major version
int getJDBCMinorVersion()Gets the minor version of the supported JDBC API.Returns:
the minor version
int getMaxBinaryLiteralLength()Returns the maximum length for hex values (characters).Returns:
0 for limit is unknown
int getMaxCatalogNameLength()Returns the maximum length for a catalog name.Returns:
0 for limit is unknown
int getMaxCharLiteralLength()Returns the maximum length for literals.Returns:
0 for limit is unknown
int getMaxColumnNameLength()Returns the maximum length for column names.Returns:
0 for limit is unknown
int getMaxColumnsInGroupBy()Returns the maximum number of columns in GROUP BY.Returns:
0 for limit is unknown
int getMaxColumnsInIndex()Returns the maximum number of columns in CREATE INDEX.Returns:
0 for limit is unknown
int getMaxColumnsInOrderBy()Returns the maximum number of columns in ORDER BY.Returns:
0 for limit is unknown
int getMaxColumnsInSelect()Returns the maximum number of columns in SELECT.Returns:
0 for limit is unknown
int getMaxColumnsInTable()Returns the maximum number of columns in CREATE TABLE.Returns:
0 for limit is unknown
int getMaxConnections()Returns the maximum number of open connection.Returns:
0 for limit is unknown
int getMaxCursorNameLength()Returns the maximum length for a cursor name.Returns:
0 for limit is unknown
int getMaxIndexLength()Returns the maximum length for an index (in bytes).Returns:
0 for limit is unknown
int getMaxProcedureNameLength()Returns the maximum length for a procedure name.Returns:
0 for limit is unknown
int getMaxRowSize()Returns the maximum size of a row (in bytes).Returns:
0 for limit is unknown
int getMaxSchemaNameLength()Returns the maximum length for a schema name.Returns:
0 for limit is unknown
int getMaxStatementLength()Returns the maximum length of a statement.Returns:
0 for limit is unknown
int getMaxStatements()Returns the maximum number of open statements.Returns:
0 for limit is unknown
int getMaxTableNameLength()Returns the maximum length for a table name.Returns:
0 for limit is unknown
int getMaxTablesInSelect()Returns the maximum number of tables in a SELECT.Returns:
0 for limit is unknown
int getMaxUserNameLength()Returns the maximum length for a user name.Returns:
0 for limit is unknown
String getNumericFunctions() throws SQLExceptionReturns the list of numeric functions supported by this database.Returns:
the list
ResultSet getPrimaryKeys(String catalog, String schema, String tableName) throws SQLExceptionGets the primary key columns for a table. The result set is sorted by TABLE_SCHEM, and COLUMN_NAME (and not by KEY_SEQ).
Parameters:
catalog - null (to get all objects) or the catalog name
schema - schema name (must be specified)
tableName - table name (must be specified)
Returns:
the list of primary key columns
Throws:
SQLException - if the connection is closed
ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLExceptionGets the list of procedure columns. The result set is sorted by PROCEDURE_SCHEM, PROCEDURE_NAME, NUM_INPUT_PARAMS, and POS. There are potentially multiple procedures with the same name, each with a different number of input parameters.
Throws:
SQLException - if the connection is closed
String getProcedureTerm()Returns the term for "procedure".Returns:
"procedure"
ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLExceptionGets the list of procedures. The result set is sorted by PROCEDURE_SCHEM, PROCEDURE_NAME, and NUM_INPUT_PARAMS. There are potentially multiple procedures with the same name, each with a different number of input parameters.
Returns:
the procedures.
Throws:
SQLException - if the connection is closed
int getResultSetHoldability()Gets the result set holdability.Returns:
ResultSet.CLOSE_CURSORS_AT_COMMIT
String getSQLKeywords()Gets the comma-separated list of all SQL keywords that are not supported as table/column/index name, in addition to the SQL-92 keywords.Returns:
a list with the keywords
int getSQLStateType()Gets the SQL State type.Returns:
DatabaseMetaData.sqlStateSQL99
String getSchemaTerm()Returns the term for "schema".Returns:
"schema"
ResultSet getSchemas() throws SQLExceptionGets the list of schemas. The result set is sorted by TABLE_SCHEM.
Returns:
the schema list
Throws:
SQLException - if the connection is closed
String getSearchStringEscape()Returns the default escape character for LIKE.Returns:
the character '\'
String getStringFunctions() throws SQLExceptionReturns the list of string functions supported by this database.Returns:
the list
ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLExceptionGet the list of super tables of a table. This method currently returns an empty result set.
Returns:
an empty result set
ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException[Not supported]String getSystemFunctions() throws SQLExceptionReturns the list of system functions supported by this database.Returns:
the list
ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLExceptionGets the list of table privileges. The result set is sorted by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.
Parameters:
catalog - null (to get all objects) or the catalog name
schemaPattern - null (to get all objects) or a schema name
(uppercase for unquoted names)
tableNamePattern - null (to get all objects) or a table name
(uppercase for unquoted names)
Returns:
the list of privileges
Throws:
SQLException - if the connection is closed
ResultSet getTableTypes() throws SQLExceptionGets the list of table types. This call returns a result set with three records: "SYSTEM TABLE", "TABLE", "and "VIEW". The result set is sorted by TABLE_TYPE.
Returns:
the table types
Throws:
SQLException - if the connection is closed
ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLExceptionGets the list of tables in the database. The result set is sorted by TABLE_TYPE, TABLE_SCHEM, and TABLE_NAME.
Parameters:
catalog - null (to get all objects) or the catalog name
schemaPattern - null (to get all objects) or a schema name
(uppercase for unquoted names)
tableNamePattern - null (to get all objects) or a table name
(uppercase for unquoted names)
types - null or a list of table types
Returns:
the list of columns
Throws:
SQLException - if the connection is closed
String getTimeDateFunctions() throws SQLExceptionReturns the list of date and time functions supported by this database.Returns:
the list
ResultSet getTypeInfo() throws SQLExceptionGets the list of data types. The result set is sorted by DATA_TYPE and afterwards by how closely the data type maps to the corresponding JDBC SQL type (best match first).
Returns:
the list of data types
Throws:
SQLException - if the connection is closed
ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLExceptionGets the list of user-defined data types. This call returns an empty result set.
Parameters:
catalog - ignored
schemaPattern - ignored
typeNamePattern - ignored
types - ignored
Returns:
an empty result set
Throws:
SQLException - if the connection is closed
String getURL() throws SQLExceptionReturns the database URL for this connection.Returns:
the url
String getUserName() throws SQLExceptionReturns the user name as passed to DriverManager.getConnection(url, user, password).Returns:
the user name
ResultSet getVersionColumns(String catalog, String schema, String tableName) throws SQLExceptionGet the list of columns that are update when any value is updated.
Parameters:
catalog - null (to get all objects) or the catalog name
schema - schema name (must be specified)
tableName - table name (must be specified)
Returns:
an empty result set
Throws:
SQLException - if the connection is closed
boolean insertsAreDetected(int type)Returns whether inserts are detected.Returns:
false
boolean isCatalogAtStart()Returns whether the catalog is at the beginning.Returns:
true
boolean isReadOnly() throws SQLExceptionReturns the same as Connection.isReadOnly().Returns:
if read only optimization is switched on
boolean locatorsUpdateCopy()Does the database make a copy before updating.Returns:
false
boolean nullPlusNonNullIsNull()Returns whether NULL+1 is NULL or not.Returns:
true
boolean nullsAreSortedAtEnd()Checks is NULL values are sorted at the end (no matter if ASC or DESC is used).Returns:
false
boolean nullsAreSortedAtStart()Checks is NULL values are sorted at the beginning (no matter if ASC or DESC is used).Returns:
false
boolean nullsAreSortedHigh()Checks is NULL values are sorted high (bigger than any non-null values).Returns:
false by default; true if the system property h2.sortNullsHigh is
set to true
boolean nullsAreSortedLow()Checks is NULL values are sorted low (smaller than any non-null values).Returns:
true by default; false if the system property h2.sortNullsHigh is
set to true
boolean othersDeletesAreVisible(int type)Returns whether other deletes are visible.Returns:
false
boolean othersInsertsAreVisible(int type)Returns whether other inserts are visible.Returns:
false
boolean othersUpdatesAreVisible(int type)Returns whether other updates are visible.Returns:
false
boolean ownDeletesAreVisible(int type)Returns whether own deletes are visible.Returns:
false
boolean ownInsertsAreVisible(int type)Returns whether own inserts are visible.Returns:
false
boolean ownUpdatesAreVisible(int type)Returns whether own updates are visible.Returns:
true
boolean storesLowerCaseIdentifiers()Checks if for CREATE TABLE Test(ID INT), getTables returns test as the table name.Returns:
false
boolean storesLowerCaseQuotedIdentifiers()Checks if for CREATE TABLE "Test"(ID INT), getTables returns test as the table name.Returns:
false
boolean storesMixedCaseIdentifiers()Checks if for CREATE TABLE Test(ID INT), getTables returns Test as the table name.Returns:
false
boolean storesMixedCaseQuotedIdentifiers()Checks if for CREATE TABLE "Test"(ID INT), getTables returns Test as the table name.Returns:
true
boolean storesUpperCaseIdentifiers()Checks if for CREATE TABLE Test(ID INT), getTables returns TEST as the table name.Returns:
true
boolean storesUpperCaseQuotedIdentifiers()Checks if for CREATE TABLE "Test"(ID INT), getTables returns TEST as the table name.Returns:
false
boolean supportsANSI92EntryLevelSQL()Returns whether SQL-92 entry level grammar is supported.Returns:
true
boolean supportsANSI92FullSQL()Returns whether SQL-92 full level grammar is supported.Returns:
false
boolean supportsANSI92IntermediateSQL()Returns whether SQL-92 intermediate level grammar is supported.Returns:
false
boolean supportsAlterTableWithAddColumn()Returns whether alter table with add column is supported.Returns:
true
boolean supportsAlterTableWithDropColumn()Returns whether alter table with drop column is supported.Returns:
true
boolean supportsBatchUpdates()Returns whether batch updates are supported.Returns:
true
boolean supportsCatalogsInDataManipulation()Returns whether the catalog name in INSERT, UPDATE, DELETE is supported.Returns:
true
boolean supportsCatalogsInIndexDefinitions()Returns whether the catalog name in CREATE INDEX is supported.Returns:
true
boolean supportsCatalogsInPrivilegeDefinitions()Returns whether the catalog name in GRANT is supported.Returns:
true
boolean supportsCatalogsInProcedureCalls()Returns whether the catalog name in procedure calls is supported.Returns:
false
boolean supportsCatalogsInTableDefinitions()Returns whether the catalog name in CREATE TABLE is supported.Returns:
true
boolean supportsColumnAliasing()Returns whether column aliasing is supported.Returns:
true
boolean supportsConvert()Returns whether CONVERT is supported.Returns:
true
boolean supportsConvert(int fromType, int toType)Returns whether CONVERT is supported for one datatype to another.Returns:
true
boolean supportsCoreSQLGrammar()Returns whether ODBC Core SQL grammar is supported.Returns:
true
boolean supportsCorrelatedSubqueries()Returns whether correlated subqueries are supported.Returns:
true
boolean supportsDataDefinitionAndDataManipulationTransactions()Returns whether data manipulation and CREATE/DROP is supported in transactions.Returns:
false
boolean supportsDataManipulationTransactionsOnly()Returns whether only data manipulations are supported in transactions.Returns:
true
boolean supportsDifferentTableCorrelationNames()Returns whether table correlation names (table alias) are restricted to be different than table names.Returns:
false
boolean supportsExpressionsInOrderBy()Returns whether expression in ORDER BY are supported.Returns:
true
boolean supportsExtendedSQLGrammar()Returns whether ODBC Extended SQL grammar is supported.Returns:
false
boolean supportsFullOuterJoins()Returns whether full outer joins are supported.Returns:
false
boolean supportsGetGeneratedKeys()Does the database support getGeneratedKeys.Returns:
true
boolean supportsGroupBy()Returns whether GROUP BY is supported.Returns:
true
boolean supportsGroupByBeyondSelect()Checks whether a GROUP BY clause can use columns that are not in the SELECT clause, provided that it specifies all the columns in the SELECT clause.Returns:
true
boolean supportsGroupByUnrelated()Returns whether GROUP BY is supported if the column is not in the SELECT list.Returns:
true
boolean supportsIntegrityEnhancementFacility()Returns whether referential integrity is supported.Returns:
true
boolean supportsLikeEscapeClause()Returns whether LIKE... ESCAPE is supported.Returns:
true
boolean supportsLimitedOuterJoins()Returns whether limited outer joins are supported.Returns:
true
boolean supportsMinimumSQLGrammar()Returns whether ODBC Minimum SQL grammar is supported.Returns:
true
boolean supportsMixedCaseIdentifiers()Checks if for CREATE TABLE Test(ID INT), getTables returns Test as the table name.Returns:
false
boolean supportsMixedCaseQuotedIdentifiers()Checks if a table created with CREATE TABLE "Test"(ID INT) is a different table than a table created with CREATE TABLE TEST(ID INT).Returns:
true
boolean supportsMultipleOpenResults()Does the database support multiple open result sets.Returns:
true
boolean supportsMultipleResultSets()Returns whether multiple result sets are supported.Returns:
false
boolean supportsMultipleTransactions()Returns whether multiple transactions (on different connections) are supported.Returns:
true
boolean supportsNamedParameters()Does the database support named parameters.Returns:
false
boolean supportsNonNullableColumns()Returns whether columns with NOT NULL are supported.Returns:
true
boolean supportsOpenCursorsAcrossCommit()Returns whether open result sets across commits are supported.Returns:
false
boolean supportsOpenCursorsAcrossRollback()Returns whether open result sets across rollback are supported.Returns:
false
boolean supportsOpenStatementsAcrossCommit()Returns whether open statements across commit are supported.Returns:
true
boolean supportsOpenStatementsAcrossRollback()Returns whether open statements across rollback are supported.Returns:
true
boolean supportsOrderByUnrelated()Returns whether ORDER BY is supported if the column is not in the SELECT list.Returns:
true
boolean supportsOuterJoins()Returns whether outer joins are supported.Returns:
true
boolean supportsPositionedDelete()Returns whether positioned deletes are supported.Returns:
true
boolean supportsPositionedUpdate()Returns whether positioned updates are supported.Returns:
true
boolean supportsResultSetConcurrency(int type, int concurrency)Returns whether a specific result set concurrency is supported. ResultSet.TYPE_SCROLL_SENSITIVE is not supported.Returns:
true if the type is not ResultSet.TYPE_SCROLL_SENSITIVE
boolean supportsResultSetHoldability(int holdability)Does this database supports a result set holdability.Parameters:
holdability - ResultSet.HOLD_CURSORS_OVER_COMMIT or
CLOSE_CURSORS_AT_COMMIT
Returns:
true if the holdability is ResultSet.CLOSE_CURSORS_AT_COMMIT
boolean supportsResultSetType(int type)Returns whether a specific result set type is supported. ResultSet.TYPE_SCROLL_SENSITIVE is not supported.Returns:
true for all types except ResultSet.TYPE_FORWARD_ONLY
boolean supportsSavepoints()Does the database support savepoints.Returns:
true
boolean supportsSchemasInDataManipulation()Returns whether the schema name in INSERT, UPDATE, DELETE is supported.Returns:
true
boolean supportsSchemasInIndexDefinitions()Returns whether the schema name in CREATE INDEX is supported.Returns:
true
boolean supportsSchemasInPrivilegeDefinitions()Returns whether the schema name in GRANT is supported.Returns:
true
boolean supportsSchemasInProcedureCalls()Returns whether the schema name in procedure calls is supported.Returns:
true
boolean supportsSchemasInTableDefinitions()Returns whether the schema name in CREATE TABLE is supported.Returns:
true
boolean supportsSelectForUpdate()Returns whether SELECT ... FOR UPDATE is supported.Returns:
true
boolean supportsStatementPooling()Does the database support statement pooling.Returns:
false
boolean supportsStoredFunctionsUsingCallSyntax()Returns whether the database supports calling functions using the call syntax.Returns:
true
boolean supportsStoredProcedures()Returns whether stored procedures are supported.Returns:
false
boolean supportsSubqueriesInComparisons()Returns whether subqueries (SELECT) in comparisons are supported.Returns:
true
boolean supportsSubqueriesInExists()Returns whether SELECT in EXISTS is supported.Returns:
true
boolean supportsSubqueriesInIns()Returns whether IN(SELECT...) is supported.Returns:
true
boolean supportsSubqueriesInQuantifieds()Returns whether subqueries in quantified expression are supported.Returns:
true
boolean supportsTableCorrelationNames()Returns whether table correlation names (table alias) are supported.Returns:
true
boolean supportsTransactionIsolationLevel(int level)Returns whether a specific transaction isolation level is supported.Returns:
true
boolean supportsTransactions()Returns whether transactions are supported.Returns:
true
boolean supportsUnion()Returns whether UNION SELECT is supported.Returns:
true
boolean supportsUnionAll()Returns whether UNION ALL SELECT is supported.Returns:
true
boolean updatesAreDetected(int type)Returns whether updates are detected.Returns:
false
boolean usesLocalFilePerTable()Checks if this database use one file per table.Returns:
false
boolean usesLocalFiles()Checks if this database store data in local files.Returns:
true
|