The object DatabaseMetadata
of the Polypheny JDBC driver provides methods to query properties of the DBMS, properties of namespaces as well as the supported functions of the driver and Polypheny.
Most of the methods in the DatabaseMetadata
object return a static value. The table below lists these functions together with the returned value. True and false indicates if the function is supported. A return value of 0 indicates that there is no limitation.
Method | Return Value | Description |
---|---|---|
allProceduresAreCallable() |
true |
Indicates whether all procedures in the database are callable by the user. |
allTablesAreSelectable() |
true |
Indicates whether all tables in the database are selectable by the user. |
getURL() |
String or null |
Retrieves the URL for the database connection. |
getUserName() |
String or null |
Retrieves the username used for the database connection. |
isReadOnly() |
false |
Indicates whether the database is in read-only mode. |
nullsAreSortedHigh() |
true |
Indicates whether NULL values are sorted at the high end of the sort order. |
nullsAreSortedLow() |
false |
Indicates whether NULL values are sorted at the low end of the sort order. |
nullsAreSortedAtStart() |
false |
Indicates whether NULL values are sorted at the start of the sorted data. |
nullsAreSortedAtEnd() |
false |
Indicates whether NULL values are sorted at the end of the sorted data. |
getDatabaseProductName() |
String |
Retrieves the name of the database product. |
getDatabaseProductVersion() |
String |
Retrieves the version of the database product. |
getDriverName() |
String |
Retrieves the name of the driver. |
getDriverVersion() |
String |
Retrieves the version of the driver. |
getDriverMajorVersion() |
int |
Retrieves the major version number of the driver. |
getDriverMinorVersion() |
int |
Retrieves the minor version number of the driver. |
usesLocalFiles() |
false |
Indicates whether the database uses local files to store data. |
usesLocalFilePerTable() |
false |
Indicates whether the database uses a separate local file for each table to store data. |
supportsMixedCaseIdentifiers() |
true |
Indicates if the database supports mixed-case (e.g., both upper and lower case) identifiers. |
storesUpperCaseIdentifiers() |
false |
Indicates if the database stores identifiers in upper case. |
storesLowerCaseIdentifiers() |
false |
Indicates if the database stores identifiers in lower case. |
storesMixedCaseIdentifiers() |
true |
Indicates if the database stores identifiers in mixed case. |
supportsMixedCaseQuotedIdentifiers() |
false |
Indicates if the database supports mixed-case quoted identifiers. |
storesUpperCaseQuotedIdentifiers() |
false |
Indicates if the database stores quoted identifiers in upper case. |
storesLowerCaseQuotedIdentifiers() |
false |
Indicates if the database stores quoted identifiers in lower case. |
storesMixedCaseQuotedIdentifiers() |
false |
Indicates if the database stores quoted identifiers in mixed case. |
getIdentifierQuoteString() |
" " |
Retrieves the string used to quote SQL identifiers. This can vary between databases. |
getSQLKeywords() |
String |
Retrieves a comma-separated list of all the SQL keywords that are used by the database. |
getNumericFunctions() |
String |
Retrieves a comma-separated list of all the numeric functions that are supported by the database. |
getStringFunctions() |
String |
Retrieves a comma-separated list of all the string functions that are supported by the database. |
getSystemFunctions() |
String |
Retrieves a comma-separated list of all the system functions that are supported by the database. |
getTimeDateFunctions() |
String |
Retrieves a comma-separated list of all the time and date functions that are supported by the database. |
getSearchStringEscape() |
"\" |
Retrieves the string that can be used to escape wildcard characters in a LIKE clause. |
getExtraNameCharacters() |
"" |
Retrieves any extra characters that are allowed in a database name. |
supportsAlterTableWithAddColumn() |
false |
Indicates whether the database supports the ALTER TABLE command with the ADD COLUMN variant. |
supportsAlterTableWithDropColumn() |
false |
Indicates whether the database supports the ALTER TABLE command with the DROP COLUMN variant. |
supportsColumnAliasing() |
true |
Indicates whether the database supports column aliasing. |
nullPlusNonNullIsNull() |
true |
Indicates whether an arithmetic operation involving a NULL always results in a NULL. |
supportsConvert() |
false |
Indicates whether the database supports the CONVERT SQL function. |
supportsConvert( int fromType, int toType ) |
false |
Indicates whether the database supports the CONVERT SQL function for the specified types. |
supportsTableCorrelationNames() |
true |
Indicates whether the database supports table correlation names. |
supportsDifferentTableCorrelationNames() |
true |
Indicates whether the database supports table correlation names that are different from the table names. |
supportsExpressionsInOrderBy() |
true |
Indicates whether the database supports using expressions in an ORDER BY clause. |
supportsOrderByUnrelated() |
true |
Indicates whether the database supports ordering by a column that isn’t in the SELECT statement. |
supportsGroupBy() |
true |
Indicates whether the database supports the SQL GROUP BY clause. |
supportsGroupByUnrelated() |
true |
Indicates whether the database supports using a GROUP BY clause that includes columns not in the SELECT. |
supportsGroupByBeyondSelect() |
true |
Indicates whether the database supports using a GROUP BY clause that includes columns from a table not in the SELECT. |
supportsLikeEscapeClause() |
true |
Indicates whether the database supports the LIKE escape clause. |
supportsMultipleResultSets() |
false |
Indicates whether the database supports having multiple ResultSet objects returned from a statement. |
supportsMultipleTransactions() |
false |
Indicates whether the database supports having multiple transactions open at once. |
supportsNonNullableColumns() |
true |
Indicates whether the database supports columns that can’t have a NULL value. |
supportsMinimumSQLGrammar() |
true |
Indicates whether the database supports the minimum SQL grammar. |
supportsCoreSQLGrammar() |
true |
Indicates whether the database supports the core SQL grammar. |
supportsExtendedSQLGrammar() |
true |
Indicates whether the database supports the extended SQL grammar. |
supportsANSI92EntryLevelSQL() |
true |
Indicates whether the database supports the ANSI92 entry-level SQL. |
supportsANSI92IntermediateSQL() |
true |
Indicates whether the database supports the ANSI92 intermediate SQL. |
supportsANSI92FullSQL() |
true |
Indicates whether the database supports the ANSI92 full SQL. |
supportsIntegrityEnhancementFacility() |
false |
Indicates whether the database supports the SQL Integrity Enhancement Facility. |
supportsOuterJoins() |
true |
Indicates whether the database supports outer joins. |
supportsFullOuterJoins() |
true |
Indicates whether the database supports full outer joins. |
supportsLimitedOuterJoins() |
true |
Indicates whether the database supports limited (certain types but not all) outer joins. |
getSchemaTerm() |
"namespace" |
Retrieves the term used by the database to refer to a schema. |
getProcedureTerm() |
"procedure" |
Retrieves the term used by the database to refer to a procedure. (Note: Stored procedures not yet supported.) |
getCatalogTerm() |
"database" |
Retrieves the term used by the database to refer to a catalog. |
isCatalogAtStart() |
false |
Determines whether the catalog appears at the start of a fully qualified table name. |
getCatalogSeparator() |
" " |
Retrieves the separator string that separates a catalog from a schema. |
supportsSchemasInDataManipulation() |
true |
Indicates whether the database supports schemas in data manipulation statements. |
supportsSchemasInProcedureCalls() |
true |
Indicates whether the database supports schemas in procedure calls. |
supportsSchemasInTableDefinitions() |
true |
Indicates whether the database supports schemas in table definitions. |
supportsSchemasInIndexDefinitions() |
true |
Indicates whether the database supports schemas in index definitions. (Note: Index definition not yet supported by polypheny!) |
supportsSchemasInPrivilegeDefinitions() |
true |
Indicates whether the database supports schemas in privilege definitions. (Note: Privilege definition not yet supported by polypheny!) |
supportsCatalogsInDataManipulation() |
false |
Indicates whether the database supports catalogs in data manipulation statements. |
supportsCatalogsInProcedureCalls() |
false |
Indicates whether the database supports catalogs in procedure calls. |
supportsCatalogsInTableDefinitions() |
false |
Indicates whether the database supports catalogs in table definitions. |
supportsCatalogsInIndexDefinitions() |
false |
Indicates whether the database supports catalogs in index definitions. (Note: Index definition not yet supported by polypheny!) |
supportsCatalogsInPrivilegeDefinitions() |
false |
Indicates whether the database supports catalogs in privilege definitions. (Note: Privilege Definition not yet supported by polypheny!) |
supportsPositionedDelete() |
false |
Indicates whether the database supports the SQL DELETE statement with a WHERE clause that is based on a cursor position. |
supportsPositionedUpdate() |
false |
Indicates whether the database supports the SQL UPDATE statement with a WHERE clause that is based on a cursor position. |
supportsSelectForUpdate() |
false |
Indicates whether the database supports the SQL SELECT FOR UPDATE statement. |
supportsStoredProcedures() |
false |
Indicates whether the database supports stored procedure calls. |
supportsSubqueriesInComparisons() |
true |
Indicates whether the database supports subqueries in comparison expressions. |
supportsSubqueriesInExists() |
true |
Indicates whether the database supports subqueries in EXISTS expressions. |
supportsSubqueriesInIns() |
true |
Indicates whether the database supports subqueries in IN statements. |
supportsSubqueriesInQuantifieds() |
false |
Indicates whether the database supports subqueries in quantified expressions. |
supportsCorrelatedSubqueries() |
true |
Indicates whether the database supports correlated subqueries. |
supportsUnion() |
true |
Indicates whether the database supports the SQL UNION clause. |
supportsUnionAll() |
true |
Indicates whether the database supports the SQL UNION ALL clause. |
supportsOpenCursorsAcrossCommit() |
false |
Indicates if a cursor remains open after a commit operation. |
supportsOpenCursorsAcrossRollback() |
false |
Indicates if a cursor remains open after a rollback operation. |
supportsOpenStatementsAcrossCommit() |
false |
Indicates if a statement remains open after a commit operation. |
supportsOpenStatementsAcrossRollback() |
false |
Indicates if a statement remains open after a rollback operation. |
getMaxBinaryLiteralLength() |
0 |
Retrieves the maximum number of hexadecimal characters a binary literal can have. |
getMaxCharLiteralLength() |
0 |
Retrieves the maximum number of characters a character literal can have. |
getMaxColumnNameLength() |
0 |
Retrieves the maximum number of characters a column name can have. |
getMaxColumnsInGroupBy() |
0 |
Retrieves the maximum number of columns a GROUP BY clause can have. |
getMaxColumnsInIndex() |
0 |
Retrieves the maximum number of columns an index can have. |
getMaxColumnsInOrderBy() |
0 |
Retrieves the maximum number of columns an ORDER BY clause can have. |
getMaxColumnsInSelect() |
0 |
Retrieves the maximum number of columns a SELECT statement can have. |
getMaxColumnsInTable() |
0 |
Retrieves the maximum number of columns a table can have. |
getMaxConnections() |
0 |
Retrieves the maximum number of active connections the database can support simultaneously. |
getMaxCursorNameLength() |
0 |
Retrieves the maximum number of characters a cursor name can have. |
getMaxIndexLength() |
0 |
Retrieves the maximum number of bytes an index can have. |
getMaxSchemaNameLength() |
0 |
Retrieves the maximum number of characters a schema name can have. |
getMaxProcedureNameLength() |
0 |
Retrieves the maximum number of characters a procedure name can have. |
getMaxCatalogNameLength() |
0 |
Retrieves the maximum number of characters a catalog name can have. |
getMaxRowSize() |
0 |
Retrieves the maximum number of bytes a single row can have. |
doesMaxRowSizeIncludeBlobs() |
false |
Indicates whether the return value of getMaxRowSize() includes the sizes of BLOB and CLOB columns. |
getMaxStatementLength() |
0 |
Retrieves the maximum number of characters a SQL statement can have. |
getMaxStatements() |
0 |
Retrieves the maximum number of statements that can be open at one time. |
getMaxTableNameLength() |
0 |
Retrieves the maximum number of characters a table name can have. |
getMaxTablesInSelect() |
0 |
Retrieves the maximum number of tables allowed in a SELECT statement. |
getMaxUserNameLength() |
0 |
Retrieves the maximum number of characters a username can have. |
getDefaultTransactionIsolation() |
PropertyUtils.getDEFAULT_TRANSACTION_ISOLATION() |
Retrieves the default transaction isolation level. |
supportsTransactions() |
true |
Indicates whether the database supports transactions. |
supportsTransactionIsolationLevel( int level ) |
PropertyUtils.isValidIsolationLevel( level ) |
Indicates whether the database supports the specified transaction isolation level. |
supportsDataDefinitionAndDataManipulationTransactions() |
true |
Indicates if both data definition and data manipulation commands are supported within a transaction. |
supportsDataManipulationTransactionsOnly() |
true |
Indicates if only data manipulation commands are supported within a transaction. |
dataDefinitionCausesTransactionCommit() |
true |
Indicates if executing a data definition statement causes an automatic commit. |
dataDefinitionIgnoredInTransactions() |
false |
Indicates if data definition statements are ignored within transactions. |
ownUpdatesAreVisible( int typ e) |
false |
Indicates whether updates made by the current session are visible. |
ownDeletesAreVisible( int type ) |
false |
Indicates whether deletes made by the current session are visible. |
ownInsertsAreVisible( int type ) |
false |
Indicates whether inserts made by the current session are visible. |
othersUpdatesAreVisible( int type ) |
false |
Indicates whether updates made by others are visible. |
othersDeletesAreVisible( int type ) |
false |
Indicates whether deletes made by others are visible. |
othersInsertsAreVisible( int type ) |
false |
Indicates whether inserts made by others are visible. |
updatesAreDetected( int i ) |
false |
Indicates whether the method detects updates. |
deletesAreDetected( int i ) |
false |
Indicates whether the method detects deletes. |
insertsAreDetected( int i ) |
false |
Indicates whether the method detects inserts. |
supportsBatchUpdates() |
true |
Indicates if the database supports batch updates. |
supportsSavepoints() |
false |
Indicates whether the database supports savepoints. |
supportsNamedParameters() |
true |
Indicates if the database supports named parameter markers for calling stored procedures. |
supportsMultipleOpenResults() |
false |
Indicates if the database supports having multiple ResultSet objects returned from a statement object simultaneously. |
supportsGetGeneratedKeys() |
false |
Indicates if the database supports the retrieval of auto-generated keys after an insertion operation. |
getSQLStateType() |
sqlStateSQL |
Retrieves the type of the SQL state codes returned by SQLException.getSQLState() . |
locatorsUpdateCopy() |
true |
Indicates whether the locators (like Blob , Clob , etc.) retrieved by this connection are updated copies or references. |
supportsStatementPooling() |
false |
Determines if the database supports the pooling of SQL statements. |
getRowIdLifetime() |
RowIdLifetime.ROWID_UNSUPPORTED |
Describes the lifetime of a RowId . This is one of the values from the RowIdLifetime enumeration in java.sql.RowIdLifetime . |
supportsStoredFunctionsUsingCallSyntax() |
false |
Determines if the database supports invoking user-defined or vendor functions using the stored procedure escape syntax. |
autoCommitFailureClosesAllResultSets() |
false |
Indicates whether a SQLException during autoCommit will close all ResultSet objects that have been opened by the Connection . If true , all such ResultSet objects will be closed. If false , they remain open. |
generatedKeyAlwaysReturned() |
false |
Determines if a generated key will always be returned if the column’s value is auto-incremented. If true , the generated key is always returned. |
© Polypheny GmbH. All Rights Reserved.