Class DatabaseMetaData
- All Implemented Interfaces:
DatabaseMetaData, Wrapper
- Direct Known Subclasses:
DatabaseMetaDataUsingInfoSchema, JDBC4DatabaseMetaData
This class provides information about the database as a whole.
Many of the methods here return lists of information in ResultSets. You can use the normal ResultSet methods such as getString and getInt to retrieve the data from these ResultSets. If a given form of metadata is not available, these methods show throw a SQLException.
Some of these methods take arguments that are String patterns. These methods all have names such as fooPattern. Within a pattern String "%" means match any substring of 0 or more characters and "_" means match any one character.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDatabaseMetaData.ComparableWrapper<K extends Object & Comparable<? super K>, V>Helper/wrapper class to provide means of sorting objects by using a sorting key.protected classHelper class to provide means of comparing indexes by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.protected class(package private) classprotected static enumEnumeration for Procedure Typesprotected classprotected classprotected classHelper class to provide means of comparing tables by TABLE_TYPE, TABLE_CAT, TABLE_SCHEM and TABLE_NAME.protected static enumEnumeration for Table Types(package private) classParses and represents common data type information used by various column/parameter methods. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MySQLConnectionThe connection to the databaseprotected StringThe 'current' database name being usedprotected static final intprotected final StringWhat character to use when quoting identifiersprotected static final byte[]protected static final byte[]protected static final byte[]Fields inherited from interface 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
ConstructorsModifierConstructorDescriptionprotectedDatabaseMetaData(MySQLConnection connToSet, String databaseToSet) Creates a new DatabaseMetaData object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCan all the procedures returned by getProcedures be called by the current user?booleanCan all the tables returned by getTable be SELECTed by the current user?(package private) static ResultSetbuildResultSet(Field[] fields, ArrayList<ResultSetRow> rows, MySQLConnection c) protected voidconvertToJdbcFunctionList(String catalog, ResultSet proceduresRs, boolean needsClientFiltering, String db, List<DatabaseMetaData.ComparableWrapper<String, ResultSetRow>> procedureRows, int nameIndex, Field[] fields) protected voidconvertToJdbcProcedureList(boolean fromSelect, String catalog, ResultSet proceduresRs, boolean needsClientFiltering, String db, List<DatabaseMetaData.ComparableWrapper<String, ResultSetRow>> procedureRows, int nameIndex) protected Field[]protected Field[]protected Field[]protected Field[]protected Field[]protected Field[]protected Field[]booleanDoes a data definition statement within a transaction force the transaction to commit?booleanIs a data definition statement within a transaction ignored?booleandeletesAreDetected(int type) JDBC 2.0 Determine whether or not a visible row delete can be detected by calling ResultSet.rowDeleted().booleanDid getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?extractForeignKeyForTable(ArrayList<ResultSetRow> rows, ResultSet rs, String catalog) Extracts foreign key info for one table.extractForeignKeyFromCreateTable(String catalog, String tableName) Creates a result set similar enough to 'SHOW TABLE STATUS' to allow the same code to work on extracting the foreign key databooleangetAttributes(String arg0, String arg1, String arg2, String arg3) getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) Get a description of a table's optimal set of columns that uniquely identifies a row.protected DatabaseMetaData.IteratorWithCleanup<String> getCatalogIterator(String catalogSpec) Get the catalog names available in this database.What's the separator between catalog and table name?What's the database vendor's preferred term for "catalog"?Retrieves a list of the client info properties that the driver supports.getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) Get a description of the access rights for a table's columns.getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) Get a description of table columns available in a catalog.protected intgetColumnType(boolean isOutParam, boolean isInParam, boolean isReturnParam, boolean forGetFunctionColumns) Determines the COLUMN_TYPE information based on parameter type (IN, OUT or INOUT) or function return parameter.JDBC 2.0 Return the connection that produced this metadata object.getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) Get a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.)intintWhat's the name of this database product?What's the version of this database product?intWhat's the database's default transaction isolation level?intWhat's this JDBC driver's major version number?intWhat's this JDBC driver's minor version number?What's the name of this JDBC driver?What's the version of this JDBC driver?protected ExceptionInterceptorgetExportedKeys(String catalog, String schema, String table) Get a description of a foreign key columns that reference a table's primary key columns (the foreign keys exported by a table).protected voidgetExportKeyResults(String catalog, String exportingTable, String keysComment, List<ResultSetRow> tuples, String fkTableName) Adds to the tuples list the exported keys of exportingTable based on the keysComment from the 'show table status' sql command.Get all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, 0-9 and _).protected int[]getForeignKeyActions(String commentString) Returns the DELETE and UPDATE foreign key actions from the given 'SHOW TABLE STATUS' string, with the DELETE action being the first item in the array, and the UPDATE action being the second.protected StringgetFullyQualifiedName(String catalog, String entity) Builds and returns a fully qualified name, quoted if necessary, for the given catalog and database entity.getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) Retrieves a description of the given catalog's system or user function parameters and return type.getFunctions(String catalog, String schemaPattern, String functionNamePattern) Retrieves a description of the system and user functions available in the given catalog.What's the string used to quote SQL identifiers?getImportedKeys(String catalog, String schema, String table) Get a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table).protected voidgetImportKeyResults(String catalog, String importingTable, String keysComment, List<ResultSetRow> tuples) Populates the tuples list with the imported keys of importingTable based on the keysComment from the 'show table status' sql command.getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) Get a description of a table's indices and statistics.protected static DatabaseMetaDatagetInstance(MySQLConnection connToSet, String databaseToSet, boolean checkForInfoSchema) protected intGetter to JDBC4 DatabaseMetaData.functionNoTable constant.intintintHow many hex characters can you have in an inline binary literal?intWhat's the maximum length of a catalog name?intWhat's the max length for a character literal?intWhat's the limit on column name length?intWhat's the maximum number of columns in a "GROUP BY" clause?intWhat's the maximum number of columns allowed in an index?intWhat's the maximum number of columns in an "ORDER BY" clause?intWhat's the maximum number of columns in a "SELECT" list?intWhat's maximum number of columns in a table?intHow many active connections can we have at a time to this database?intWhat's the maximum cursor name length?intWhat's the maximum length of an index (in bytes)?intWhat's the maximum length of a procedure name?intWhat's the maximum length of a single row?intWhat's the maximum length allowed for a schema name?intWhat's the maximum length of a SQL statement?intHow many active statements can we have open at one time to this database?intWhat's the maximum length of a table name?intWhat's the maximum number of tables in a SELECT?intWhat's the maximum length of a user name?Get a comma separated list of math functions.getPrimaryKeys(String catalog, String schema, String table) Get a description of a table's primary key columns.getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) Get a description of a catalog's stored procedure parameters and result columns.protected ResultSetgetProcedureOrFunctionColumns(Field[] fields, String catalog, String schemaPattern, String procedureOrFunctionNamePattern, String columnNamePattern, boolean returnProcedures, boolean returnFunctions) getProcedures(String catalog, String schemaPattern, String procedureNamePattern) Get a description of stored procedures available in a catalog.protected ResultSetgetProceduresAndOrFunctions(Field[] fields, String catalog, String schemaPattern, String procedureNamePattern, boolean returnProcedures, boolean returnFunctions) What's the database vendor's preferred term for "procedure"?getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) JDBC-4.1intGet the schema names available in this database.getSchemas(String catalog, String schemaPattern) What's the database vendor's preferred term for "schema"?This is the string that can be used to escape '_' or '%' in the string pattern style catalog search parameters.Get a comma separated list of all a database's SQL keywords that are NOT also SQL92/SQL2003 keywords.intGet a comma separated list of string functions.getSuperTables(String arg0, String arg1, String arg2) getSuperTypes(String arg0, String arg1, String arg2) Get a comma separated list of system functions.protected StringgetTableNameWithCase(String table) getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) Get a description of the access rights for each table available in a catalog.Get a description of tables available in a catalog.Get the table types available in this database.Get a comma separated list of time and date functions.Get a description of all the standard SQL types supported by this database.JDBC 2.0 Get a description of the user-defined types defined in a particular schema.getURL()What's the url for this database?What's our user name as known to the database?getVersionColumns(String catalog, String schema, String table) Get a description of a table's columns that are automatically updated when any value in a row is updated.booleaninsertsAreDetected(int type) JDBC 2.0 Determine whether or not a visible row insert can be detected by calling ResultSet.rowInserted().booleanDoes a catalog appear at the start of a qualified table name?booleanIs the database in read-only mode?booleanbooleanAre concatenations between NULL and non-NULL values NULL?booleanAre NULL values sorted at the end regardless of sort order?booleanAre NULL values sorted at the start regardless of sort order?booleanAre NULL values sorted high?booleanAre NULL values sorted low?booleanothersDeletesAreVisible(int type) booleanothersInsertsAreVisible(int type) booleanothersUpdatesAreVisible(int type) JDBC 2.0 Determine whether changes made by others are visible.booleanownDeletesAreVisible(int type) booleanownInsertsAreVisible(int type) booleanownUpdatesAreVisible(int type) JDBC 2.0 Determine whether a result set's own changes visible.parseTableStatusIntoLocalAndReferencedColumns(String keysComment) protected PreparedStatementGet a prepared statement to query information_schema tables.booleanprotected byte[]Converts the given string to bytes, using the connection's character encoding, or if not available, the JVM default encoding.booleanDoes the database store mixed case unquoted SQL identifiers in lower case?booleanDoes the database store mixed case quoted SQL identifiers in lower case?booleanDoes the database store mixed case unquoted SQL identifiers in mixed case?booleanDoes the database store mixed case quoted SQL identifiers in mixed case?booleanDoes the database store mixed case unquoted SQL identifiers in upper case?booleanDoes the database store mixed case quoted SQL identifiers in upper case?booleanIs "ALTER TABLE" with add column supported?booleanIs "ALTER TABLE" with drop column supported?booleanIs the ANSI92 entry level SQL grammar supported?booleanIs the ANSI92 full SQL grammar supported?booleanIs the ANSI92 intermediate SQL grammar supported?booleanJDBC 2.0 Return true if the driver supports batch updates, else return false.booleanCan a catalog name be used in a data manipulation statement?booleanCan a catalog name be used in a index definition statement?booleanCan a catalog name be used in a privilege definition statement?booleanCan a catalog name be used in a procedure call statement?booleanCan a catalog name be used in a table definition statement?booleanIs column aliasing supported?booleanIs the CONVERT function between SQL types supported?booleansupportsConvert(int fromType, int toType) Is CONVERT between the given SQL types supported?booleanIs the ODBC Core SQL grammar supported?booleanAre correlated subqueries supported?booleanAre both data definition and data manipulation statements within a transaction supported?booleanAre only data manipulation statements within a transaction supported?booleanIf table correlation names are supported, are they restricted to be different from the names of the tables?booleanAre expressions in "ORDER BY" lists supported?booleanIs the ODBC Extended SQL grammar supported?booleanAre full nested outer joins supported?booleanJDBC 3.0booleanIs some form of "GROUP BY" clause supported?booleanCan a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?booleanCan a "GROUP BY" clause use columns not in the SELECT?booleanIs the SQL Integrity Enhancement Facility supported?booleanIs the escape character in "LIKE" clauses supported?booleanIs there limited support for outer joins?booleanIs the ODBC Minimum SQL grammar supported?booleanDoes the database support mixed case unquoted SQL identifiers?booleanDoes the database support mixed case quoted SQL identifiers?booleanbooleanAre multiple ResultSets from a single execute supported?booleanCan we have multiple transactions open at once (on different connections)?booleanbooleanCan columns be defined as non-nullable?booleanCan cursors remain open across commits?booleanCan cursors remain open across rollbacks?booleanCan statements remain open across commits?booleanCan statements remain open across rollbacks?booleanCan an "ORDER BY" clause use columns not in the SELECT?booleanIs some form of outer join supported?booleanIs positioned DELETE supported?booleanIs positioned UPDATE supported?booleansupportsResultSetConcurrency(int type, int concurrency) JDBC 2.0 Does the database support the concurrency type in combination with the given result set type?booleansupportsResultSetHoldability(int holdability) booleansupportsResultSetType(int type) JDBC 2.0 Does the database support the given result set type?booleanbooleanCan a schema name be used in a data manipulation statement?booleanCan a schema name be used in an index definition statement?booleanCan a schema name be used in a privilege definition statement?booleanCan a schema name be used in a procedure call statement?booleanCan a schema name be used in a table definition statement?booleanIs SELECT for UPDATE supported?booleanbooleanbooleanAre stored procedure calls using the stored procedure escape syntax supported?booleanAre subqueries in comparison expressions supported?booleanAre subqueries in exists expressions supported?booleanAre subqueries in "in" statements supported?booleanAre subqueries in quantified expressions supported?booleanAre table correlation names supported?booleansupportsTransactionIsolationLevel(int level) Does the database support the given transaction isolation level?booleanAre transactions supported?booleanIs SQL UNION supported?booleanIs SQL UNION ALL supported?booleanupdatesAreDetected(int type) JDBC 2.0 Determine whether or not a visible row update can be detected by calling ResultSet.rowUpdated().booleanDoes the database use a file for each table?booleanDoes the database store tables in a local file?Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DatabaseMetaData
autoCommitFailureClosesAllResultSets, getMaxLogicalLobSize, getRowIdLifetime, supportsRefCursors, supportsShardingMethods inherited from interface Wrapper
isWrapperFor, unwrap
-
Field Details
-
MAX_IDENTIFIER_LENGTH
protected static final int MAX_IDENTIFIER_LENGTH- See Also:
-
TABLE_AS_BYTES
protected static final byte[] TABLE_AS_BYTES -
SYSTEM_TABLE_AS_BYTES
protected static final byte[] SYSTEM_TABLE_AS_BYTES -
VIEW_AS_BYTES
protected static final byte[] VIEW_AS_BYTES -
conn
The connection to the database -
database
The 'current' database name being used -
quotedId
What character to use when quoting identifiers
-
-
Constructor Details
-
DatabaseMetaData
Creates a new DatabaseMetaData object.- Parameters:
connToSet-databaseToSet-
-
-
Method Details
-
getInstance
protected static DatabaseMetaData getInstance(MySQLConnection connToSet, String databaseToSet, boolean checkForInfoSchema) throws SQLException - Parameters:
connToSet- must not be nulldatabaseToSet-checkForInfoSchema-- Returns:
- Throws:
SQLException
-
allProceduresAreCallable
Can all the procedures returned by getProcedures be called by the current user?- Specified by:
allProceduresAreCallablein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
allTablesAreSelectable
Can all the tables returned by getTable be SELECTed by the current user?- Specified by:
allTablesAreSelectablein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
buildResultSet
static ResultSet buildResultSet(Field[] fields, ArrayList<ResultSetRow> rows, MySQLConnection c) throws SQLException - Throws:
SQLException
-
convertToJdbcFunctionList
protected void convertToJdbcFunctionList(String catalog, ResultSet proceduresRs, boolean needsClientFiltering, String db, List<DatabaseMetaData.ComparableWrapper<String, ResultSetRow>> procedureRows, int nameIndex, Field[] fields) throws SQLException - Throws:
SQLException
-
getFullyQualifiedName
-
getJDBC4FunctionNoTableConstant
protected int getJDBC4FunctionNoTableConstant()Getter to JDBC4 DatabaseMetaData.functionNoTable constant. This method must be overridden by JDBC4 subclasses. This implementation should never be called.- Returns:
- 0
-
convertToJdbcProcedureList
protected void convertToJdbcProcedureList(boolean fromSelect, String catalog, ResultSet proceduresRs, boolean needsClientFiltering, String db, List<DatabaseMetaData.ComparableWrapper<String, ResultSetRow>> procedureRows, int nameIndex) throws SQLException - Throws:
SQLException
-
getColumnType
protected int getColumnType(boolean isOutParam, boolean isInParam, boolean isReturnParam, boolean forGetFunctionColumns) Determines the COLUMN_TYPE information based on parameter type (IN, OUT or INOUT) or function return parameter.- Parameters:
isOutParam- Indicates whether it's an output parameter.isInParam- Indicates whether it's an input parameter.isReturnParam- Indicates whether it's a function return parameter.forGetFunctionColumns- Indicates whether the column belong to a function. This argument is required for JDBC4, in which case this method must be overridden to provide the correct functionality.- Returns:
- The corresponding COLUMN_TYPE as in java.sql.getProcedureColumns API.
-
getExceptionInterceptor
-
dataDefinitionCausesTransactionCommit
Does a data definition statement within a transaction force the transaction to commit?- Specified by:
dataDefinitionCausesTransactionCommitin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
dataDefinitionIgnoredInTransactions
Is a data definition statement within a transaction ignored?- Specified by:
dataDefinitionIgnoredInTransactionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
deletesAreDetected
JDBC 2.0 Determine whether or not a visible row delete can be detected by calling ResultSet.rowDeleted(). If deletesAreDetected() returns false, then deleted rows are removed from the result set.- Specified by:
deletesAreDetectedin interfaceDatabaseMetaData- Parameters:
type- set type, i.e. ResultSet.TYPE_XXX- Returns:
- true if changes are detected by the resultset type
- Throws:
SQLException- if a database-access error occurs.
-
doesMaxRowSizeIncludeBlobs
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?- Specified by:
doesMaxRowSizeIncludeBlobsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
extractForeignKeyForTable
public List<ResultSetRow> extractForeignKeyForTable(ArrayList<ResultSetRow> rows, ResultSet rs, String catalog) throws SQLException Extracts foreign key info for one table.- Parameters:
rows- the list of rows to add tors- the result set from 'SHOW CREATE TABLE'catalog- the database name- Returns:
- the list of rows with new rows added
- Throws:
SQLException- if a database access error occurs
-
extractForeignKeyFromCreateTable
public ResultSet extractForeignKeyFromCreateTable(String catalog, String tableName) throws SQLException Creates a result set similar enough to 'SHOW TABLE STATUS' to allow the same code to work on extracting the foreign key data- Parameters:
catalog- the database name to extract foreign key info fortableName- the table to extract foreign key info forconnToUse- the database connection to usemetadata- the DatabaseMetaData instance calling this method- Returns:
- A result set that has the structure of 'show table status'
- Throws:
SQLException- if a database access error occurs.
-
getAttributes
public ResultSet getAttributes(String arg0, String arg1, String arg2, String arg3) throws SQLException - Specified by:
getAttributesin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getBestRowIdentifier
public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException Get a description of a table's optimal set of columns that uniquely identifies a row. They are ordered by SCOPE.Each column description has the following columns:
- SCOPE short => actual scope of result
- bestRowTemporary - very temporary, while using row
- bestRowTransaction - valid for remainder of current transaction
- bestRowSession - valid for remainder of current session
- COLUMN_NAME String => column name
- DATA_TYPE short => SQL data type from java.sql.Types
- TYPE_NAME String => Data source dependent type name
- COLUMN_SIZE int => precision
- BUFFER_LENGTH int => not used
- DECIMAL_DIGITS short => scale
- PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
- bestRowUnknown - may or may not be pseudo column
- bestRowNotPseudo - is NOT a pseudo column
- bestRowPseudo - is a pseudo column
- Specified by:
getBestRowIdentifierin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name; "" retrieves those without a schematable- a table namescope- the scope of interest; use same values as SCOPEnullable- include columns that are nullable?- Returns:
- ResultSet each row is a column description
- Throws:
SQLException
- SCOPE short => actual scope of result
-
getCatalogIterator
protected DatabaseMetaData.IteratorWithCleanup<String> getCatalogIterator(String catalogSpec) throws SQLException - Throws:
SQLException
-
getCatalogs
Get the catalog names available in this database. The results are ordered by catalog name.The catalog column is:
- TABLE_CAT String => catalog name
- Specified by:
getCatalogsin interfaceDatabaseMetaData- Returns:
- ResultSet each row has a single String column that is a catalog name
- Throws:
SQLException
-
getCatalogSeparator
What's the separator between catalog and table name?- Specified by:
getCatalogSeparatorin interfaceDatabaseMetaData- Returns:
- the separator string
- Throws:
SQLException
-
getCatalogTerm
What's the database vendor's preferred term for "catalog"?- Specified by:
getCatalogTermin interfaceDatabaseMetaData- Returns:
- the vendor term
- Throws:
SQLException
-
getColumnPrivileges
public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException Get a description of the access rights for a table's columns.Only privileges matching the column name criteria are returned. They are ordered by COLUMN_NAME and PRIVILEGE.
Each privilige description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- COLUMN_NAME String => column name
- GRANTOR => grantor of access (may be null)
- GRANTEE String => grantee of access
- PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
- IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
- Specified by:
getColumnPrivilegesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name; "" retrieves those without a schematable- a table namecolumnNamePattern- a column name pattern- Returns:
- ResultSet each row is a column privilege description
- Throws:
SQLException- if a database access error occurs- See Also:
-
getColumns
public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException Get a description of table columns available in a catalog.Only column descriptions matching the catalog, schema, table and column name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION.
Each column description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- COLUMN_NAME String => column name
- DATA_TYPE short => SQL type from java.sql.Types
- TYPE_NAME String => Data source dependent type name
- COLUMN_SIZE int => column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.
- BUFFER_LENGTH is not used.
- DECIMAL_DIGITS int => the number of fractional digits
- NUM_PREC_RADIX int => Radix (typically either 10 or 2)
- NULLABLE int => is NULL allowed?
- columnNoNulls - might not allow NULL values
- columnNullable - definitely allows NULL values
- columnNullableUnknown - nullability unknown
- REMARKS String => comment describing column (may be null)
- COLUMN_DEF String => default value (may be null)
- SQL_DATA_TYPE int => unused
- SQL_DATETIME_SUB int => unused
- CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
- ORDINAL_POSITION int => index of column in table (starting at 1)
- IS_NULLABLE String => "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.
- Specified by:
getColumnsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschemaPattern- a schema name pattern; "" retrieves those without a schematableNamePattern- a table name patterncolumnNamePattern- a column name pattern- Returns:
- ResultSet each row is a column description
- Throws:
SQLException- if a database access error occurs- See Also:
-
createColumnsFields
-
getConnection
JDBC 2.0 Return the connection that produced this metadata object.- Specified by:
getConnectionin interfaceDatabaseMetaData- Returns:
- the connection that produced this metadata object.
- Throws:
SQLException- if a database error occurs
-
getCrossReference
public ResultSet getCrossReference(String primaryCatalog, String primarySchema, String primaryTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException Get a description of the foreign key columns in the foreign key table that reference the primary key columns of the primary key table (describe how one table imports another's key.) This should normally return a single foreign key/primary key pair (most tables only import a foreign key from a table once.) They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.Each foreign key column description has the following columns:
- PKTABLE_CAT String => primary key table catalog (may be null)
- PKTABLE_SCHEM String => primary key table schema (may be null)
- PKTABLE_NAME String => primary key table name
- PKCOLUMN_NAME String => primary key column name
- FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
- FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
- FKTABLE_NAME String => foreign key table name being exported
- FKCOLUMN_NAME String => foreign key column name being exported
- KEY_SEQ short => sequence number within foreign key
- UPDATE_RULE short => What happens to foreign key when primary is updated:
- importedKeyCascade - change imported key to agree with primary key update
- importedKeyRestrict - do not allow update of primary key if it has been imported
- importedKeySetNull - change imported key to NULL if its primary key has been updated
- DELETE_RULE short => What happens to the foreign key when primary is deleted.
- importedKeyCascade - delete rows that import a deleted key
- importedKeyRestrict - do not allow delete of primary key if it has been imported
- importedKeySetNull - change imported key to NULL if its primary key has been deleted
- FK_NAME String => foreign key identifier (may be null)
- PK_NAME String => primary key identifier (may be null)
- Specified by:
getCrossReferencein interfaceDatabaseMetaData- Parameters:
primaryCatalog- a catalog name; "" retrieves those without a catalogprimarySchema- a schema name pattern; "" retrieves those without a schemaprimaryTable- a table nameforeignCatalog- a catalog name; "" retrieves those without a catalogforeignSchema- a schema name pattern; "" retrieves those without a schemaforeignTable- a table name- Returns:
- ResultSet each row is a foreign key column description
- Throws:
SQLException- if a database access error occurs
-
createFkMetadataFields
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersionin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersionin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getDatabaseProductName
What's the name of this database product?- Specified by:
getDatabaseProductNamein interfaceDatabaseMetaData- Returns:
- database product name
- Throws:
SQLException
-
getDatabaseProductVersion
What's the version of this database product?- Specified by:
getDatabaseProductVersionin interfaceDatabaseMetaData- Returns:
- database version
- Throws:
SQLException
-
getDefaultTransactionIsolation
What's the database's default transaction isolation level? The values are defined in java.sql.Connection.- Specified by:
getDefaultTransactionIsolationin interfaceDatabaseMetaData- Returns:
- the default isolation level
- Throws:
SQLException- if a database access error occurs- See Also:
-
getDriverMajorVersion
public int getDriverMajorVersion()What's this JDBC driver's major version number?- Specified by:
getDriverMajorVersionin interfaceDatabaseMetaData- Returns:
- JDBC driver major version
-
getDriverMinorVersion
public int getDriverMinorVersion()What's this JDBC driver's minor version number?- Specified by:
getDriverMinorVersionin interfaceDatabaseMetaData- Returns:
- JDBC driver minor version number
-
getDriverName
What's the name of this JDBC driver?- Specified by:
getDriverNamein interfaceDatabaseMetaData- Returns:
- JDBC driver name
- Throws:
SQLException
-
getDriverVersion
What's the version of this JDBC driver?- Specified by:
getDriverVersionin interfaceDatabaseMetaData- Returns:
- JDBC driver version
- Throws:
SQLException
-
getExportedKeys
Get a description of a foreign key columns that reference a table's primary key columns (the foreign keys exported by a table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and KEY_SEQ.Each foreign key column description has the following columns:
- PKTABLE_CAT String => primary key table catalog (may be null)
- PKTABLE_SCHEM String => primary key table schema (may be null)
- PKTABLE_NAME String => primary key table name
- PKCOLUMN_NAME String => primary key column name
- FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
- FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
- FKTABLE_NAME String => foreign key table name being exported
- FKCOLUMN_NAME String => foreign key column name being exported
- KEY_SEQ short => sequence number within foreign key
- UPDATE_RULE short => What happens to foreign key when primary is updated:
- importedKeyCascade - change imported key to agree with primary key update
- importedKeyRestrict - do not allow update of primary key if it has been imported
- importedKeySetNull - change imported key to NULL if its primary key has been updated
- DELETE_RULE short => What happens to the foreign key when primary is deleted.
- importedKeyCascade - delete rows that import a deleted key
- importedKeyRestrict - do not allow delete of primary key if it has been imported
- importedKeySetNull - change imported key to NULL if its primary key has been deleted
- FK_NAME String => foreign key identifier (may be null)
- PK_NAME String => primary key identifier (may be null)
- Specified by:
getExportedKeysin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name pattern; "" retrieves those without a schematable- a table name- Returns:
- ResultSet each row is a foreign key column description
- Throws:
SQLException- if a database access error occurs- See Also:
-
getExportKeyResults
protected void getExportKeyResults(String catalog, String exportingTable, String keysComment, List<ResultSetRow> tuples, String fkTableName) throws SQLException Adds to the tuples list the exported keys of exportingTable based on the keysComment from the 'show table status' sql command. KeysComment is that part of the comment field that follows the "InnoDB free ...;" prefix.- Parameters:
catalog- the database to useexportingTable- the table keys are being exported fromkeysComment- the comment from 'show table status'tuples- the rows to add results tofkTableName- the foreign key table name- Throws:
SQLException- if a database access error occurs
-
getExtraNameCharacters
Get all the "extra" characters that can be used in unquoted identifier names (those beyond a-z, 0-9 and _).- Specified by:
getExtraNameCharactersin interfaceDatabaseMetaData- Returns:
- the string containing the extra characters
- Throws:
SQLException
-
getForeignKeyActions
Returns the DELETE and UPDATE foreign key actions from the given 'SHOW TABLE STATUS' string, with the DELETE action being the first item in the array, and the UPDATE action being the second.- Parameters:
commentString- the comment from 'SHOW TABLE STATUS'- Returns:
- int[] [0] = delete action, [1] = update action
-
getIdentifierQuoteString
What's the string used to quote SQL identifiers? This returns a space " " if identifier quoting isn't supported. A JDBC compliant driver always uses a double quote character.- Specified by:
getIdentifierQuoteStringin interfaceDatabaseMetaData- Returns:
- the quoting string
- Throws:
SQLException
-
getImportedKeys
Get a description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). They are ordered by PKTABLE_CAT, PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.Each primary key column description has the following columns:
- PKTABLE_CAT String => primary key table catalog being imported (may be null)
- PKTABLE_SCHEM String => primary key table schema being imported (may be null)
- PKTABLE_NAME String => primary key table name being imported
- PKCOLUMN_NAME String => primary key column name being imported
- FKTABLE_CAT String => foreign key table catalog (may be null)
- FKTABLE_SCHEM String => foreign key table schema (may be null)
- FKTABLE_NAME String => foreign key table name
- FKCOLUMN_NAME String => foreign key column name
- KEY_SEQ short => sequence number within foreign key
- UPDATE_RULE short => What happens to foreign key when primary is updated:
- importedKeyCascade - change imported key to agree with primary key update
- importedKeyRestrict - do not allow update of primary key if it has been imported
- importedKeySetNull - change imported key to NULL if its primary key has been updated
- DELETE_RULE short => What happens to the foreign key when primary is deleted.
- importedKeyCascade - delete rows that import a deleted key
- importedKeyRestrict - do not allow delete of primary key if it has been imported
- importedKeySetNull - change imported key to NULL if its primary key has been deleted
- FK_NAME String => foreign key name (may be null)
- PK_NAME String => primary key name (may be null)
- Specified by:
getImportedKeysin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name pattern; "" retrieves those without a schematable- a table name- Returns:
- ResultSet each row is a primary key column description
- Throws:
SQLException- if a database access error occurs- See Also:
-
getImportKeyResults
protected void getImportKeyResults(String catalog, String importingTable, String keysComment, List<ResultSetRow> tuples) throws SQLException Populates the tuples list with the imported keys of importingTable based on the keysComment from the 'show table status' sql command. KeysComment is that part of the comment field that follows the "InnoDB free ...;" prefix.- Parameters:
catalog- the database to useimportingTable- the table keys are being imported tokeysComment- the comment from 'show table status'tuples- the rows to add results to- Throws:
SQLException- if a database access error occurs
-
getIndexInfo
public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException Get a description of a table's indices and statistics. They are ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.Each index column description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- NON_UNIQUE boolean => Can index values be non-unique? false when TYPE is tableIndexStatistic
- INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
- INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
- TYPE short => index type:
- tableIndexStatistic - this identifies table statistics that are returned in conjuction with a table's index descriptions
- tableIndexClustered - this is a clustered index
- tableIndexHashed - this is a hashed index
- tableIndexOther - this is some other style of index
- ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
- COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
- ASC_OR_DESC String => column sort sequence, "A" => ascending, "D" => descending, may be null if sort sequence is not supported; null when TYPE is tableIndexStatistic
- CARDINALITY int/long => When TYPE is tableIndexStatisic then this is the number of rows in the table; otherwise it is the number of unique values in the index.
- PAGES int/long => When TYPE is tableIndexStatisic then this is the number of pages used for the table, otherwise it is the number of pages used for the current index.
- FILTER_CONDITION String => Filter condition, if any. (may be null)
- Specified by:
getIndexInfoin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name pattern; "" retrieves those without a schematable- a table nameunique- when true, return only indices for unique values; when false, return indices regardless of whether unique or notapproximate- when true, result is allowed to reflect approximate or out of data values; when false, results are requested to be accurate- Returns:
- ResultSet each row is an index column description
- Throws:
SQLException
-
createIndexInfoFields
-
getJDBCMajorVersion
- Specified by:
getJDBCMajorVersionin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getJDBCMinorVersion
- Specified by:
getJDBCMinorVersionin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getMaxBinaryLiteralLength
How many hex characters can you have in an inline binary literal?- Specified by:
getMaxBinaryLiteralLengthin interfaceDatabaseMetaData- Returns:
- max literal length
- Throws:
SQLException
-
getMaxCatalogNameLength
What's the maximum length of a catalog name?- Specified by:
getMaxCatalogNameLengthin interfaceDatabaseMetaData- Returns:
- max name length in bytes
- Throws:
SQLException
-
getMaxCharLiteralLength
What's the max length for a character literal?- Specified by:
getMaxCharLiteralLengthin interfaceDatabaseMetaData- Returns:
- max literal length
- Throws:
SQLException
-
getMaxColumnNameLength
What's the limit on column name length?- Specified by:
getMaxColumnNameLengthin interfaceDatabaseMetaData- Returns:
- max literal length
- Throws:
SQLException
-
getMaxColumnsInGroupBy
What's the maximum number of columns in a "GROUP BY" clause?- Specified by:
getMaxColumnsInGroupByin interfaceDatabaseMetaData- Returns:
- max number of columns
- Throws:
SQLException
-
getMaxColumnsInIndex
What's the maximum number of columns allowed in an index?- Specified by:
getMaxColumnsInIndexin interfaceDatabaseMetaData- Returns:
- max columns
- Throws:
SQLException
-
getMaxColumnsInOrderBy
What's the maximum number of columns in an "ORDER BY" clause?- Specified by:
getMaxColumnsInOrderByin interfaceDatabaseMetaData- Returns:
- max columns
- Throws:
SQLException
-
getMaxColumnsInSelect
What's the maximum number of columns in a "SELECT" list?- Specified by:
getMaxColumnsInSelectin interfaceDatabaseMetaData- Returns:
- max columns
- Throws:
SQLException
-
getMaxColumnsInTable
What's maximum number of columns in a table?- Specified by:
getMaxColumnsInTablein interfaceDatabaseMetaData- Returns:
- max columns
- Throws:
SQLException
-
getMaxConnections
How many active connections can we have at a time to this database?- Specified by:
getMaxConnectionsin interfaceDatabaseMetaData- Returns:
- max connections
- Throws:
SQLException
-
getMaxCursorNameLength
What's the maximum cursor name length?- Specified by:
getMaxCursorNameLengthin interfaceDatabaseMetaData- Returns:
- max cursor name length in bytes
- Throws:
SQLException
-
getMaxIndexLength
What's the maximum length of an index (in bytes)?- Specified by:
getMaxIndexLengthin interfaceDatabaseMetaData- Returns:
- max index length in bytes
- Throws:
SQLException
-
getMaxProcedureNameLength
What's the maximum length of a procedure name?- Specified by:
getMaxProcedureNameLengthin interfaceDatabaseMetaData- Returns:
- max name length in bytes
- Throws:
SQLException
-
getMaxRowSize
What's the maximum length of a single row?- Specified by:
getMaxRowSizein interfaceDatabaseMetaData- Returns:
- max row size in bytes
- Throws:
SQLException
-
getMaxSchemaNameLength
What's the maximum length allowed for a schema name?- Specified by:
getMaxSchemaNameLengthin interfaceDatabaseMetaData- Returns:
- max name length in bytes
- Throws:
SQLException
-
getMaxStatementLength
What's the maximum length of a SQL statement?- Specified by:
getMaxStatementLengthin interfaceDatabaseMetaData- Returns:
- max length in bytes
- Throws:
SQLException
-
getMaxStatements
How many active statements can we have open at one time to this database?- Specified by:
getMaxStatementsin interfaceDatabaseMetaData- Returns:
- the maximum
- Throws:
SQLException
-
getMaxTableNameLength
What's the maximum length of a table name?- Specified by:
getMaxTableNameLengthin interfaceDatabaseMetaData- Returns:
- max name length in bytes
- Throws:
SQLException
-
getMaxTablesInSelect
What's the maximum number of tables in a SELECT?- Specified by:
getMaxTablesInSelectin interfaceDatabaseMetaData- Returns:
- the maximum
- Throws:
SQLException
-
getMaxUserNameLength
What's the maximum length of a user name?- Specified by:
getMaxUserNameLengthin interfaceDatabaseMetaData- Returns:
- max name length in bytes
- Throws:
SQLException
-
getNumericFunctions
Get a comma separated list of math functions.- Specified by:
getNumericFunctionsin interfaceDatabaseMetaData- Returns:
- the list
- Throws:
SQLException
-
getPrimaryKeys
Get a description of a table's primary key columns. They are ordered by COLUMN_NAME.Each column description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- COLUMN_NAME String => column name
- KEY_SEQ short => sequence number within primary key
- PK_NAME String => primary key name (may be null)
- Specified by:
getPrimaryKeysin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name pattern; "" retrieves those without a schematable- a table name- Returns:
- ResultSet each row is a primary key column description
- Throws:
SQLException
-
getProcedureColumns
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException Get a description of a catalog's stored procedure parameters and result columns.Only descriptions matching the schema, procedure and parameter name criteria are returned. They are ordered by PROCEDURE_SCHEM and PROCEDURE_NAME. Within this, the return value, if any, is first. Next are the parameter descriptions in call order. The column descriptions follow in column number order.
Each row in the ResultSet is a parameter description or column description with the following fields:
- PROCEDURE_CAT String => procedure catalog (may be null)
- PROCEDURE_SCHEM String => procedure schema (may be null)
- PROCEDURE_NAME String => procedure name
- COLUMN_NAME String => column/parameter name
- COLUMN_TYPE Short => kind of column/parameter:
- procedureColumnUnknown - nobody knows
- procedureColumnIn - IN parameter
- procedureColumnInOut - INOUT parameter
- procedureColumnOut - OUT parameter
- procedureColumnReturn - procedure return value
- procedureColumnResult - result column in ResultSet
- DATA_TYPE short => SQL type from java.sql.Types
- TYPE_NAME String => SQL type name
- PRECISION int => precision
- LENGTH int => length in bytes of data
- SCALE short => scale
- RADIX short => radix
- NULLABLE short => can it contain NULL?
- procedureNoNulls - does not allow NULL values
- procedureNullable - allows NULL values
- procedureNullableUnknown - nullability unknown
- REMARKS String => comment describing parameter/column
- COLUMN_DEF String => default value for the column (may be null)
- SQL_DATA_TYPE int => reserved for future use
- SQL_DATETIME_SUB int => reserved for future use
- CHAR_OCTET_LENGTH int => the maximum length of binary and character based columns. For any other datatype the returned value is a NULL
- ORDINAL_POSITION int => the ordinal position, starting from 1. A value of 0 is returned if this row describes the procedure's return value.
- IS_NULLABLE String => ISO rules are used to determine the nullability for a column.
- YES --- if the parameter can include NULLs
- NO --- if the parameter cannot include NULLs
- empty string --- if the nullability for the parameter is unknown
- SPECIFIC_NAME String => the name which uniquely identifies this procedure within its schema.
Note: Some databases may not return the column descriptions for a procedure.
- Specified by:
getProcedureColumnsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschemaPattern- a schema name pattern; "" retrieves those without a schemaprocedureNamePattern- a procedure name patterncolumnNamePattern- a column name pattern- Returns:
- ResultSet each row is a stored procedure parameter or column description
- Throws:
SQLException- if a database access error occurs- See Also:
-
createProcedureColumnsFields
-
getProcedureOrFunctionColumns
protected ResultSet getProcedureOrFunctionColumns(Field[] fields, String catalog, String schemaPattern, String procedureOrFunctionNamePattern, String columnNamePattern, boolean returnProcedures, boolean returnFunctions) throws SQLException - Throws:
SQLException
-
getProcedures
public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException Get a description of stored procedures available in a catalog.Only procedure descriptions matching the schema and procedure name criteria are returned. They are ordered by PROCEDURE_SCHEM, and PROCEDURE_NAME.
Each procedure description has the the following columns:
- PROCEDURE_CAT String => procedure catalog (may be null)
- PROCEDURE_SCHEM String => procedure schema (may be null)
- PROCEDURE_NAME String => procedure name
- reserved for future use
- reserved for future use
- reserved for future use
- REMARKS String => explanatory comment on the procedure
- PROCEDURE_TYPE short => kind of procedure:
- procedureResultUnknown - May return a result
- procedureNoResult - Does not return a result
- procedureReturnsResult - Returns a result
- Specified by:
getProceduresin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschemaPattern- a schema name pattern; "" retrieves those without a schemaprocedureNamePattern- a procedure name pattern- Returns:
- ResultSet each row is a procedure description
- Throws:
SQLException- if a database access error occurs- See Also:
-
createFieldMetadataForGetProcedures
-
getProceduresAndOrFunctions
protected ResultSet getProceduresAndOrFunctions(Field[] fields, String catalog, String schemaPattern, String procedureNamePattern, boolean returnProcedures, boolean returnFunctions) throws SQLException - Parameters:
fields-catalog-schemaPattern-procedureNamePattern-returnProcedures-returnFunctions-- Throws:
SQLException
-
getProcedureTerm
What's the database vendor's preferred term for "procedure"?- Specified by:
getProcedureTermin interfaceDatabaseMetaData- Returns:
- the vendor term
- Throws:
SQLException- if an error occurs (don't know why it would in this case...)
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getSchemas
Get the schema names available in this database. The results are ordered by schema name.The schema column is:
- TABLE_SCHEM String => schema name
- Specified by:
getSchemasin interfaceDatabaseMetaData- Returns:
- ResultSet each row has a single String column that is a schema name
- Throws:
SQLException
-
getSchemaTerm
What's the database vendor's preferred term for "schema"?- Specified by:
getSchemaTermin interfaceDatabaseMetaData- Returns:
- the vendor term
- Throws:
SQLException
-
getSearchStringEscape
This is the string that can be used to escape '_' or '%' in the string pattern style catalog search parameters.The '_' character represents any single character.
The '%' character represents any sequence of zero or more characters.
- Specified by:
getSearchStringEscapein interfaceDatabaseMetaData- Returns:
- the string used to escape wildcard characters
- Throws:
SQLException
-
getSQLKeywords
Get a comma separated list of all a database's SQL keywords that are NOT also SQL92/SQL2003 keywords.- Specified by:
getSQLKeywordsin interfaceDatabaseMetaData- Returns:
- the list
- Throws:
SQLException
-
getSQLStateType
- Specified by:
getSQLStateTypein interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getStringFunctions
Get a comma separated list of string functions.- Specified by:
getStringFunctionsin interfaceDatabaseMetaData- Returns:
- the list
- Throws:
SQLException
-
getSuperTables
- Specified by:
getSuperTablesin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getSuperTypes
- Specified by:
getSuperTypesin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
getSystemFunctions
Get a comma separated list of system functions.- Specified by:
getSystemFunctionsin interfaceDatabaseMetaData- Returns:
- the list
- Throws:
SQLException
-
getTableNameWithCase
-
getTablePrivileges
public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException Get a description of the access rights for each table available in a catalog.Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.
Each privilige description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- COLUMN_NAME String => column name
- GRANTOR => grantor of access (may be null)
- GRANTEE String => grantee of access
- PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
- IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown
- Specified by:
getTablePrivilegesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschemaPattern- a schema name pattern; "" retrieves those without a schematableNamePattern- a table name pattern- Returns:
- ResultSet each row is a table privilege description
- Throws:
SQLException- if a database access error occurs- See Also:
-
getTables
public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException Get a description of tables available in a catalog.Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
Each table description has the following columns:
- TABLE_CAT String => table catalog (may be null)
- TABLE_SCHEM String => table schema (may be null)
- TABLE_NAME String => table name
- TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
- REMARKS String => explanatory comment on the table
Note: Some databases may not return information for all tables.
- Specified by:
getTablesin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschemaPattern- a schema name pattern; "" retrieves those without a schematableNamePattern- a table name patterntypes- a list of table types to include; null returns all types- Returns:
- ResultSet each row is a table description
- Throws:
SQLException- See Also:
-
createTablesFields
-
getTableTypes
Get the table types available in this database. The results are ordered by table type.The table type is:
- TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
- Specified by:
getTableTypesin interfaceDatabaseMetaData- Returns:
- ResultSet each row has a single String column that is a table type
- Throws:
SQLException
-
getTimeDateFunctions
Get a comma separated list of time and date functions.- Specified by:
getTimeDateFunctionsin interfaceDatabaseMetaData- Returns:
- the list
- Throws:
SQLException
-
getTypeInfo
Get a description of all the standard SQL types supported by this database. They are ordered by DATA_TYPE and then by how closely the data type maps to the corresponding JDBC SQL type.Each type description has the following columns:
- TYPE_NAME String => Type name
- DATA_TYPE short => SQL data type from java.sql.Types
- PRECISION int => maximum precision
- LITERAL_PREFIX String => prefix used to quote a literal (may be null)
- LITERAL_SUFFIX String => suffix used to quote a literal (may be null)
- CREATE_PARAMS String => parameters used in creating the type (may be null)
- NULLABLE short => can you use NULL for this type?
- typeNoNulls - does not allow NULL values
- typeNullable - allows NULL values
- typeNullableUnknown - nullability unknown
- CASE_SENSITIVE boolean=> is it case sensitive?
- SEARCHABLE short => can you use "WHERE" based on this type:
- typePredNone - No support
- typePredChar - Only supported with WHERE .. LIKE
- typePredBasic - Supported except for WHERE .. LIKE
- typeSearchable - Supported for all WHERE ..
- UNSIGNED_ATTRIBUTE boolean => is it unsigned?
- FIXED_PREC_SCALE boolean => can it be a money value?
- AUTO_INCREMENT boolean => can it be used for an auto-increment value?
- LOCAL_TYPE_NAME String => localized version of type name (may be null)
- MINIMUM_SCALE short => minimum scale supported
- MAXIMUM_SCALE short => maximum scale supported
- SQL_DATA_TYPE int => unused
- SQL_DATETIME_SUB int => unused
- NUM_PREC_RADIX int => usually 2 or 10
- Specified by:
getTypeInfoin interfaceDatabaseMetaData- Returns:
- ResultSet each row is a SQL type description
- Throws:
SQLException
-
getUDTs
public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException JDBC 2.0 Get a description of the user-defined types defined in a particular schema. Schema specific UDTs may have type JAVA_OBJECT, STRUCT, or DISTINCT.Only types matching the catalog, schema, type name and type criteria are returned. They are ordered by DATA_TYPE, TYPE_SCHEM and TYPE_NAME. The type name parameter may be a fully qualified name. In this case, the catalog and schemaPattern parameters are ignored.
Each type description has the following columns:
- TYPE_CAT String => the type's catalog (may be null)
- TYPE_SCHEM String => type's schema (may be null)
- TYPE_NAME String => type name
- CLASS_NAME String => Java class name
- DATA_TYPE String => type value defined in java.sql.Types. One of JAVA_OBJECT, STRUCT, or DISTINCT
- REMARKS String => explanatory comment on the type
Note: If the driver does not support UDTs then an empty result set is returned.
- Specified by:
getUDTsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteriaschemaPattern- a schema name pattern; "" retrieves those without a schematypeNamePattern- a type name pattern; may be a fully qualified nametypes- a list of user-named types to include (JAVA_OBJECT, STRUCT, or DISTINCT); null returns all types- Returns:
- ResultSet - each row is a type description
- Throws:
SQLException- if a database-access error occurs.
-
getURL
What's the url for this database?- Specified by:
getURLin interfaceDatabaseMetaData- Returns:
- the url or null if it can't be generated
- Throws:
SQLException
-
getUserName
What's our user name as known to the database?- Specified by:
getUserNamein interfaceDatabaseMetaData- Returns:
- our database user name
- Throws:
SQLException
-
getVersionColumns
Get a description of a table's columns that are automatically updated when any value in a row is updated. They are unordered.Each column description has the following columns:
- SCOPE short => is not used
- COLUMN_NAME String => column name
- DATA_TYPE short => SQL data type from java.sql.Types
- TYPE_NAME String => Data source dependent type name
- COLUMN_SIZE int => precision
- BUFFER_LENGTH int => length of column value in bytes
- DECIMAL_DIGITS short => scale
- PSEUDO_COLUMN short => is this a pseudo column like an Oracle ROWID
- versionColumnUnknown - may or may not be pseudo column
- versionColumnNotPseudo - is NOT a pseudo column
- versionColumnPseudo - is a pseudo column
- Specified by:
getVersionColumnsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; "" retrieves those without a catalogschema- a schema name; "" retrieves those without a schematable- a table name- Returns:
- ResultSet each row is a column description
- Throws:
SQLException
-
insertsAreDetected
JDBC 2.0 Determine whether or not a visible row insert can be detected by calling ResultSet.rowInserted().- Specified by:
insertsAreDetectedin interfaceDatabaseMetaData- Parameters:
type- set type, i.e. ResultSet.TYPE_XXX- Returns:
- true if changes are detected by the resultset type
- Throws:
SQLException- if a database-access error occurs.
-
isCatalogAtStart
Does a catalog appear at the start of a qualified table name? (Otherwise it appears at the end)- Specified by:
isCatalogAtStartin interfaceDatabaseMetaData- Returns:
- true if it appears at the start
- Throws:
SQLException
-
isReadOnly
Is the database in read-only mode?- Specified by:
isReadOnlyin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
locatorsUpdateCopy
- Specified by:
locatorsUpdateCopyin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
nullPlusNonNullIsNull
Are concatenations between NULL and non-NULL values NULL? A JDBC compliant driver always returns true.- Specified by:
nullPlusNonNullIsNullin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
nullsAreSortedAtEnd
Are NULL values sorted at the end regardless of sort order?- Specified by:
nullsAreSortedAtEndin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
nullsAreSortedAtStart
Are NULL values sorted at the start regardless of sort order?- Specified by:
nullsAreSortedAtStartin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
nullsAreSortedHigh
Are NULL values sorted high?- Specified by:
nullsAreSortedHighin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
nullsAreSortedLow
Are NULL values sorted low?- Specified by:
nullsAreSortedLowin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
othersDeletesAreVisible
- Specified by:
othersDeletesAreVisiblein interfaceDatabaseMetaData- Parameters:
type-- Throws:
SQLException
-
othersInsertsAreVisible
- Specified by:
othersInsertsAreVisiblein interfaceDatabaseMetaData- Parameters:
type-- Throws:
SQLException
-
othersUpdatesAreVisible
JDBC 2.0 Determine whether changes made by others are visible.- Specified by:
othersUpdatesAreVisiblein interfaceDatabaseMetaData- Parameters:
type- set type, i.e. ResultSet.TYPE_XXX- Returns:
- true if changes are visible for the result set type
- Throws:
SQLException- if a database-access error occurs.
-
ownDeletesAreVisible
- Specified by:
ownDeletesAreVisiblein interfaceDatabaseMetaData- Parameters:
type-- Throws:
SQLException
-
ownInsertsAreVisible
- Specified by:
ownInsertsAreVisiblein interfaceDatabaseMetaData- Parameters:
type-- Throws:
SQLException
-
ownUpdatesAreVisible
JDBC 2.0 Determine whether a result set's own changes visible.- Specified by:
ownUpdatesAreVisiblein interfaceDatabaseMetaData- Parameters:
type- set type, i.e. ResultSet.TYPE_XXX- Returns:
- true if changes are visible for the result set type
- Throws:
SQLException- if a database-access error occurs.
-
parseTableStatusIntoLocalAndReferencedColumns
protected DatabaseMetaData.LocalAndReferencedColumns parseTableStatusIntoLocalAndReferencedColumns(String keysComment) throws SQLException - Throws:
SQLException
-
s2b
Converts the given string to bytes, using the connection's character encoding, or if not available, the JVM default encoding.- Parameters:
s-- Throws:
SQLException
-
storesLowerCaseIdentifiers
Does the database store mixed case unquoted SQL identifiers in lower case?- Specified by:
storesLowerCaseIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
storesLowerCaseQuotedIdentifiers
Does the database store mixed case quoted SQL identifiers in lower case? A JDBC compliant driver will always return false.- Specified by:
storesLowerCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
storesMixedCaseIdentifiers
Does the database store mixed case unquoted SQL identifiers in mixed case?- Specified by:
storesMixedCaseIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
storesMixedCaseQuotedIdentifiers
Does the database store mixed case quoted SQL identifiers in mixed case? A JDBC compliant driver will always return false.- Specified by:
storesMixedCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
storesUpperCaseIdentifiers
Does the database store mixed case unquoted SQL identifiers in upper case?- Specified by:
storesUpperCaseIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
storesUpperCaseQuotedIdentifiers
Does the database store mixed case quoted SQL identifiers in upper case? A JDBC compliant driver will always return true.- Specified by:
storesUpperCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsAlterTableWithAddColumn
Is "ALTER TABLE" with add column supported?- Specified by:
supportsAlterTableWithAddColumnin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsAlterTableWithDropColumn
Is "ALTER TABLE" with drop column supported?- Specified by:
supportsAlterTableWithDropColumnin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsANSI92EntryLevelSQL
Is the ANSI92 entry level SQL grammar supported? All JDBC compliant drivers must return true.- Specified by:
supportsANSI92EntryLevelSQLin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsANSI92FullSQL
Is the ANSI92 full SQL grammar supported?- Specified by:
supportsANSI92FullSQLin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsANSI92IntermediateSQL
Is the ANSI92 intermediate SQL grammar supported?- Specified by:
supportsANSI92IntermediateSQLin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsBatchUpdates
JDBC 2.0 Return true if the driver supports batch updates, else return false.- Specified by:
supportsBatchUpdatesin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsCatalogsInDataManipulation
Can a catalog name be used in a data manipulation statement?- Specified by:
supportsCatalogsInDataManipulationin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsCatalogsInIndexDefinitions
Can a catalog name be used in a index definition statement?- Specified by:
supportsCatalogsInIndexDefinitionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsCatalogsInPrivilegeDefinitions
Can a catalog name be used in a privilege definition statement?- Specified by:
supportsCatalogsInPrivilegeDefinitionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsCatalogsInProcedureCalls
Can a catalog name be used in a procedure call statement?- Specified by:
supportsCatalogsInProcedureCallsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsCatalogsInTableDefinitions
Can a catalog name be used in a table definition statement?- Specified by:
supportsCatalogsInTableDefinitionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsColumnAliasing
Is column aliasing supported?If so, the SQL AS clause can be used to provide names for computed columns or to provide alias names for columns as required. A JDBC compliant driver always returns true.
- Specified by:
supportsColumnAliasingin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsConvert
Is the CONVERT function between SQL types supported?- Specified by:
supportsConvertin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsConvert
Is CONVERT between the given SQL types supported?- Specified by:
supportsConvertin interfaceDatabaseMetaData- Parameters:
fromType- the type to convert fromtoType- the type to convert to- Returns:
- true if so
- Throws:
SQLException- if an error occurs- See Also:
-
supportsCoreSQLGrammar
Is the ODBC Core SQL grammar supported?- Specified by:
supportsCoreSQLGrammarin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsDataDefinitionAndDataManipulationTransactions
Are both data definition and data manipulation statements within a transaction supported?- Specified by:
supportsDataDefinitionAndDataManipulationTransactionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsDataManipulationTransactionsOnly
Are only data manipulation statements within a transaction supported?- Specified by:
supportsDataManipulationTransactionsOnlyin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsDifferentTableCorrelationNames
If table correlation names are supported, are they restricted to be different from the names of the tables? A JDBC compliant driver always returns true.- Specified by:
supportsDifferentTableCorrelationNamesin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsExpressionsInOrderBy
Are expressions in "ORDER BY" lists supported?- Specified by:
supportsExpressionsInOrderByin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsExtendedSQLGrammar
Is the ODBC Extended SQL grammar supported?- Specified by:
supportsExtendedSQLGrammarin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsFullOuterJoins
Are full nested outer joins supported?- Specified by:
supportsFullOuterJoinsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsGetGeneratedKeys
public boolean supportsGetGeneratedKeys()JDBC 3.0- Specified by:
supportsGetGeneratedKeysin interfaceDatabaseMetaData
-
supportsGroupBy
Is some form of "GROUP BY" clause supported?- Specified by:
supportsGroupByin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsGroupByBeyondSelect
Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?- Specified by:
supportsGroupByBeyondSelectin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsIntegrityEnhancementFacility
Is the SQL Integrity Enhancement Facility supported?- Specified by:
supportsIntegrityEnhancementFacilityin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsLikeEscapeClause
Is the escape character in "LIKE" clauses supported? A JDBC compliant driver always returns true.- Specified by:
supportsLikeEscapeClausein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsLimitedOuterJoins
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)- Specified by:
supportsLimitedOuterJoinsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsMinimumSQLGrammar
Is the ODBC Minimum SQL grammar supported? All JDBC compliant drivers must return true.- Specified by:
supportsMinimumSQLGrammarin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsMixedCaseIdentifiers
Does the database support mixed case unquoted SQL identifiers?- Specified by:
supportsMixedCaseIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsMixedCaseQuotedIdentifiers
Does the database support mixed case quoted SQL identifiers? A JDBC compliant driver will always return true.- Specified by:
supportsMixedCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsMultipleOpenResults
- Specified by:
supportsMultipleOpenResultsin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
supportsMultipleResultSets
Are multiple ResultSets from a single execute supported?- Specified by:
supportsMultipleResultSetsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsMultipleTransactions
Can we have multiple transactions open at once (on different connections)?- Specified by:
supportsMultipleTransactionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsNamedParameters
- Specified by:
supportsNamedParametersin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
supportsNonNullableColumns
Can columns be defined as non-nullable? A JDBC compliant driver always returns true.- Specified by:
supportsNonNullableColumnsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsOpenCursorsAcrossCommit
Can cursors remain open across commits?- Specified by:
supportsOpenCursorsAcrossCommitin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs- See Also:
-
supportsOpenCursorsAcrossRollback
Can cursors remain open across rollbacks?- Specified by:
supportsOpenCursorsAcrossRollbackin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if an error occurs- See Also:
-
supportsOpenStatementsAcrossCommit
Can statements remain open across commits?- Specified by:
supportsOpenStatementsAcrossCommitin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if an error occurs- See Also:
-
supportsOpenStatementsAcrossRollback
Can statements remain open across rollbacks?- Specified by:
supportsOpenStatementsAcrossRollbackin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if an error occurs- See Also:
-
supportsOuterJoins
Is some form of outer join supported?- Specified by:
supportsOuterJoinsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsPositionedDelete
Is positioned DELETE supported?- Specified by:
supportsPositionedDeletein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsPositionedUpdate
Is positioned UPDATE supported?- Specified by:
supportsPositionedUpdatein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsResultSetConcurrency
JDBC 2.0 Does the database support the concurrency type in combination with the given result set type?- Specified by:
supportsResultSetConcurrencyin interfaceDatabaseMetaData- Parameters:
type- defined in java.sql.ResultSetconcurrency- type defined in java.sql.ResultSet- Returns:
- true if so
- Throws:
SQLException- if a database-access error occurs.- See Also:
-
supportsResultSetHoldability
- Specified by:
supportsResultSetHoldabilityin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
supportsResultSetType
JDBC 2.0 Does the database support the given result set type?- Specified by:
supportsResultSetTypein interfaceDatabaseMetaData- Parameters:
type- defined in java.sql.ResultSet- Returns:
- true if so
- Throws:
SQLException- if a database-access error occurs.- See Also:
-
supportsSavepoints
- Specified by:
supportsSavepointsin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
supportsSchemasInDataManipulation
Can a schema name be used in a data manipulation statement?- Specified by:
supportsSchemasInDataManipulationin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSchemasInIndexDefinitions
Can a schema name be used in an index definition statement?- Specified by:
supportsSchemasInIndexDefinitionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSchemasInPrivilegeDefinitions
Can a schema name be used in a privilege definition statement?- Specified by:
supportsSchemasInPrivilegeDefinitionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSchemasInProcedureCalls
Can a schema name be used in a procedure call statement?- Specified by:
supportsSchemasInProcedureCallsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSchemasInTableDefinitions
Can a schema name be used in a table definition statement?- Specified by:
supportsSchemasInTableDefinitionsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSelectForUpdate
Is SELECT for UPDATE supported?- Specified by:
supportsSelectForUpdatein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsStatementPooling
- Specified by:
supportsStatementPoolingin interfaceDatabaseMetaData- Throws:
SQLException- See Also:
-
supportsStoredProcedures
Are stored procedure calls using the stored procedure escape syntax supported?- Specified by:
supportsStoredProceduresin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSubqueriesInComparisons
Are subqueries in comparison expressions supported? A JDBC compliant driver always returns true.- Specified by:
supportsSubqueriesInComparisonsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSubqueriesInExists
Are subqueries in exists expressions supported? A JDBC compliant driver always returns true.- Specified by:
supportsSubqueriesInExistsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSubqueriesInIns
Are subqueries in "in" statements supported? A JDBC compliant driver always returns true.- Specified by:
supportsSubqueriesInInsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsSubqueriesInQuantifieds
Are subqueries in quantified expressions supported? A JDBC compliant driver always returns true.- Specified by:
supportsSubqueriesInQuantifiedsin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsTableCorrelationNames
Are table correlation names supported? A JDBC compliant driver always returns true.- Specified by:
supportsTableCorrelationNamesin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsTransactionIsolationLevel
Does the database support the given transaction isolation level?- Specified by:
supportsTransactionIsolationLevelin interfaceDatabaseMetaData- Parameters:
level- the values are defined in java.sql.Connection- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs- See Also:
-
supportsTransactions
Are transactions supported? If not, commit is a noop and the isolation level is TRANSACTION_NONE.- Specified by:
supportsTransactionsin interfaceDatabaseMetaData- Returns:
- true if transactions are supported
- Throws:
SQLException
-
supportsUnion
Is SQL UNION supported? A JDBC compliant driver always returns true.- Specified by:
supportsUnionin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
supportsUnionAll
Is SQL UNION ALL supported? A JDBC compliant driver always returns true.- Specified by:
supportsUnionAllin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
updatesAreDetected
JDBC 2.0 Determine whether or not a visible row update can be detected by calling ResultSet.rowUpdated().- Specified by:
updatesAreDetectedin interfaceDatabaseMetaData- Parameters:
type- set type, i.e. ResultSet.TYPE_XXX- Returns:
- true if changes are detected by the resultset type
- Throws:
SQLException- if a database-access error occurs.
-
usesLocalFilePerTable
Does the database use a file for each table?- Specified by:
usesLocalFilePerTablein interfaceDatabaseMetaData- Returns:
- true if the database uses a local file for each table
- Throws:
SQLException
-
usesLocalFiles
Does the database store tables in a local file?- Specified by:
usesLocalFilesin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException
-
getClientInfoProperties
Retrieves a list of the client info properties that the driver supports. The result set contains the following columns- NAME String=> The name of the client info property
- MAX_LEN int=> The maximum length of the value for the property
- DEFAULT_VALUE String=> The default value of the property
- DESCRIPTION String=> A description of the property. This will typically contain information as to where this property is stored in the database.
The
ResultSetis sorted by the NAME column- Specified by:
getClientInfoPropertiesin interfaceDatabaseMetaData- Returns:
- A
ResultSetobject; each row is a supported client info property - Throws:
SQLException- if a database access error occurs- Since:
- 1.6
- NAME String=> The name of the client info property
-
getFunctionColumns
public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException Retrieves a description of the given catalog's system or user function parameters and return type.- Specified by:
getFunctionColumnsin interfaceDatabaseMetaData- Throws:
SQLException- Since:
- 1.6
- See Also:
-
createFunctionColumnsFields
-
getFunctions
public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException Retrieves a description of the system and user functions available in the given catalog.Only system and user function descriptions matching the schema and function name criteria are returned. They are ordered by
FUNCTION_CAT,FUNCTION_SCHEM,FUNCTION_NAMEandSPECIFIC_ NAME.Each function description has the the following columns:
- FUNCTION_CAT String => function catalog (may be
null) - FUNCTION_SCHEM String => function schema (may be
null) - FUNCTION_NAME String => function name. This is the name used to invoke the function
- REMARKS String => explanatory comment on the function
- FUNCTION_TYPE short => kind of function:
- functionResultUnknown - Cannot determine if a return value or table will be returned
- functionNoTable- Does not return a table
- functionReturnsTable - Returns a table
- SPECIFIC_NAME String => the name which uniquely identifies this function within its schema. This is a user specified, or DBMS generated, name
that may be different then the
FUNCTION_NAMEfor example with overload functions
A user may not have permission to execute any of the functions that are returned by
getFunctions- Specified by:
getFunctionsin interfaceDatabaseMetaData- Parameters:
catalog- a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog;nullmeans that the catalog name should not be used to narrow the searchschemaPattern- a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema;nullmeans that the schema name should not be used to narrow the searchfunctionNamePattern- a function name pattern; must match the function name as it is stored in the database- Returns:
ResultSet- each row is a function description- Throws:
SQLException- if a database access error occurs- Since:
- 1.6
- See Also:
- FUNCTION_CAT String => function catalog (may be
-
providesQueryObjectGenerator
- Throws:
SQLException
-
getSchemas
- Specified by:
getSchemasin interfaceDatabaseMetaData- Parameters:
catalog-schemaPattern-- Throws:
SQLException
-
supportsStoredFunctionsUsingCallSyntax
- Specified by:
supportsStoredFunctionsUsingCallSyntaxin interfaceDatabaseMetaData- Throws:
SQLException
-
prepareMetaDataSafeStatement
Get a prepared statement to query information_schema tables.- Returns:
- PreparedStatement
- Throws:
SQLException
-
getPseudoColumns
public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException JDBC-4.1- Specified by:
getPseudoColumnsin interfaceDatabaseMetaData- Parameters:
catalog-schemaPattern-tableNamePattern-columnNamePattern-- Throws:
SQLException
-
generatedKeyAlwaysReturned
- Specified by:
generatedKeyAlwaysReturnedin interfaceDatabaseMetaData- Throws:
SQLException
-