Progress
JDBC Driver Guide


Return Values for DatabaseMetaData

Applications call methods of the DatabaseMetaData class to retrieve details about the JDBC support provided by the Progress SQL-92 JDBC driver.

Table 3–4 lists each method of the DatabaseMetaData class and shows what the Progress SQL-92 JDBC driver returns when an application calls the method. For details on the format and usage of each method, see the Java Core API documentation for your platform. Many of the methods return lists of information as an object of type ResultSet. Use the normal ResultSet methods, such as getString and getInt, to retrieve the data from the result sets.

Table 3–4: Return Values for DatabaseMetaData Methods
Method
Description
Returns
allProceduresAreCallable()
Can all the procedures returned by getProcedures be called by the current user?
False
allTablesAreSelectable()
Can all the tables returned by getTable be SELECTed by the current user?
False
dataDefinitionCausesTransactionCommit()
Does a data definition statement within a transaction force the transaction to commit?
True
dataDefinitionIgnoredInTransactions()
Is a data definition statement within a transaction ignored?
False
doesMaxRowSizeIncludeBlobs()
Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY blobs?
False
getBestRowIdentifier
(String, String, String, int, boolean)
Get a description of a table’s optimal set of columns that uniquely identifies a row.
(result set)
getCatalogs()
Get the catalog names available in this database.
(result set)
getCatalogSeparator()
What is the separator between catalog and table names?
. (period)
getCatalogTerm()
What is the database vendor’s preferred term for “catalog”?
database
getColumnPrivileges
(String, String, String, String)
Get a description of the access rights for a table’s columns.
(result set)
getColumns(String, String, String, String)
Get a description of table columns available in a catalog.
(result set)
getCrossReference
(String, String, String, String, String, String)
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.
(result set)
getDatabaseProductName()
What is the name of this database product?
PROGRESS
getDatabaseProductVersion()
What is the version of this database product?
09.1C
getDefaultTransactionIsolation()
What is the database’s default transaction isolation level? The values are defined in java.sql.Connection.
TRANSACTION
_REPEATABLE_READ
getDriverMajorVersion()
What is the version of this JDBC driver?
1
getDriverMinorVersion()
What is the minor version of this JDBC driver?
1000
getDriverName()
What is the name of this JDBC driver?
JDBC-PROGRESS Windows: JdbcProgress.dll
Solaris and Compaq Tru64:
libJdbcProgressjdbc.so
IBM AIX: libJdbcProgressjdbc.a
Hewlett Packard:
libJdbcProgressjdbc.sl
getDriverVersion()
What is the version of this JDBC driver?
1.1000 (03.60.0006)
getExportedKeys(String, String, String)
Get a description of the foreign key columns that reference a table’s primary key columns (the foreign keys exported by a table).
(result set)
getExtraNameCharacters()
Get all the “extra” characters that can be used in unquoted identifier names (those beyond a–z, A–Z, 0–9 and _)
“_”, “%”
getIdentifierQuoteString ()
What is the string used to quote SQL identifiers? This returns a space “ “ if identifier quoting is not supported.
“ “
getImportedKeys(String, String, String)
Get a description of the primary key columns that reference a table’s foreign key columns (the primary keys imported by a table).
(result set)
getIndexInfo
(String, String, String, boolean, boolean)
Get a description of a table’s indices and statistics.
(result set)
getMaxBinaryLiteralLength()
How many hex characters can you have in an inline binary literal?
31995
getMaxCatalogNameLength()
What is the maximum length of a catalog name?
32
getMaxCharLiteralLength()
What is the maximum length for a character literal?
31995
getMaxColumnNameLength()
What is the limit on column name length?
32
getMaxColumnsInGroupBy()
What is the maximum number of columns in a "GROUP BY" clause?
499
getMaxColumnsInIndex()
What is the maximum number of columns allowed in an index?
16
getMaxColumnsInOrderBy()
What is the maximum number of columns in an "ORDER BY" clause?
0
getMaxColumnsInSelect()
What is the maximum number of columns in a "SELECT" list?
500
getMaxColumnsInTable()
What is the maximum number of columns in a table?
500
getMaxConnections()
How many active connections can we have at a time to this database?
0
getMaxCursorNameLength()
What is the maximum cursor name length?
18
getMaxIndexLength()
What is the maximum length of an index (in bytes)?
113
getMaxProcedureNameLength()
What is the maximum length of a procedure name?
32
getMaxRowSize()
What is the maximum length of a single row?
31995 bytes
getMaxSchemaNameLength()
What is the maximum length allowed for a schema name?
32
getMaxStatementLength()
What is the maximum length of a SQL statement?
131000
getMaxStatements()
How many active statements can we have open at one time to this database?
100
getMaxTableNameLength()
What is the maximum length of a table name?
32
getMaxTablesInSelect()
What is the maximum number of tables in a SELECT?
250
getMaxUserNameLength()
What is the maximum length of a user name?
32
getNumericFunctions()
Get a comma-separated list of math functions.
ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, DEGREES, EXP, FLOOR, LOG10, MOD, PI, POWER, RADIANS, RAND, ROUND, SIGN,SIN, SQRT, TAN
getPrimaryKeys(String, String, String)
Get a description of a table’s primary key columns.
(result set)
getProcedureColumns
(String, String, String, String)
Get a description of a catalog’s stored procedure parameters and result columns.
(result set)
getProcedures(String, String, String)
Get a description of stored procedures available in a catalog.
(result set)
getProcedureTerm()
What is the database vendor’s preferred term for “procedure?”
“procedure”
getSchemas()
Get the schema names available in this database.
(result set)
getSchemaTerm()
What is the database vendor’s preferred term for “schema?”
Owner
getSearchStringEscape()
This is the string that can be used to escape ’_’ or ’%’ in the string pattern style catalog search parameters.
“\”
getSQLKeywords()
Get a comma-separated list of all a database’s SQL keywords that are NOT also SQL-92 keywords.
NAME, AREA
getStringFunctions()
Get a comma-separated list of string functions.
ASCII, CHAR, CONCAT, DIFFERENCE,
INSERT, LCASE, LEFT, LENGTH, LOCATE, LOCATE2, LTRIM, REPEAT, REPLACE, RIGHT, RTRIM, SPACE, SUBSTRING, UCASE
getSystemFunctions()
Get a comma-separated list of system functions.
USERNAME, IFNULL, DBNAME
getTablePrivileges(String, String, String)
Get a description of the access rights for each table available in a catalog.
(result set)
getTables(String, String, String, String [])
Get a description of tables available in a catalog.
(result set)
getTableTypes()
Get the table types available in this database.
(result set)
getTimeDateFunctions()
Get a comma-separated list of time and date functions.
CURDATE, CURTIME, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, HOUR, MINUTE, SECOND, MONTHNAME, NOW, TIMESTAMPADD, TIMESTAMPDIFF
getTypeInfo()
Get a description of all the standard SQL types supported by this database.
(result set)
getURL()
What is the URL for this database?
(the URL)
getUserName()
What is our user name as known to the database?
(user name)
getVersionColumns(String, String, String)
Get a description of a table’s columns that are automatically updated when any value in a row is updated.
(result set)
isCatalogAtStart()
Does a catalog appear at the start of a qualified table name? Otherwise it appears at the end.
False
isReadOnly()
Is the database in read-only mode?
False
nullPlusNonNullIsNull()
Are concatenations between NULL and non-NULL values NULL? A JDBC-Compliant driver always returns true.
True
nullsAreSortedAtEnd()
Are NULL values sorted at the end regardless of sort order?
False
nullsAreSortedAtStart()
Are NULL values sorted at the start regardless of sort order?
False
nullsAreSortedHigh()
Are NULL values sorted high?
False
nullsAreSortedLow()
Are NULL values sorted low?
True
storesLowerCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in lowercase?
False
storesLowerCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in lowercase?
False
storesMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in mixed case?
False
storesMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in mixed case?
True
storesUpperCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case insensitive and store them in uppercase?
True
storesUpperCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case insensitive and store them in uppercase?
False
supportsAlterTableWithAddColumn()
Is "ALTER TABLE" with add column supported?
False
supportsAlterTableWithDropColumn()
Is "ALTER TABLE" with drop column supported?
False
supportsANSI92EntryLevelSQL()
Is the ANSI92 entry level SQL grammar supported? All JDBC-compliant drivers must return true.
True
supportsANSI92FullSQL()
Is the ANSI92 full SQL grammar supported?
False
supportsANSI92IntermediateSQL()
Is the ANSI92 intermediate SQL grammar supported?
False
supportsCatalogsInDataManipulation()
Can a catalog name be used in a data manipulation statement?
False
supportsCatalogsInIndexDefinitions()
Can a catalog name be used in an index definition statement?
False
supportsCatalogsInPrivilegeDefinitions()
Can a catalog name be used in a privilege definition statement?
False
supportsCatalogsInProcedureCalls()
Can a catalog name be used in a procedure call statement?
False
supportsCatalogsInTableDefinitions()
Can a catalog name be used in a table definition statement?
False
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.
True
supportsConvert()
Is the CONVERT function between SQL types supported?
True
supportsConvert(int, int)
Is CONVERT between the given SQL types supported?
True
supportsCoreSQLGrammar()
Is the ODBC Core SQL grammar supported?
True
supportsCorrelatedSubqueries()
Are correlated subqueries supported? A JDBC-compliant driver always returns true.
False
supportsDataDefinitionAndData
ManipulationTransactions ()
Are both data definition and data manipulation statements within a transaction supported?
True
supportsDataManipulationTransactions
Only()
Are only data manipulation statements within a transaction supported?
False
supportsDifferentTableCorrelationNames()
If table correlation names are supported, are they restricted to be different from the names of the tables?
True
supportsExpressionsInOrderBy()
Are expressions in "ORDER BY" lists supported?
True
supportsExtendedSQLGrammar()
Is the ODBC Extended SQL grammar supported?
True
supportsFullOuterJoins()
Are full nested outer joins supported?
False
supportsGroupBy()
Is some form of "GROUP BY" clause supported?
True
supportsGroupByBeyondSelect()
Can a "GROUP BY" clause add columns not in the SELECT provided it specifies all the columns in the SELECT?
True
supportsGroupByUnrelated()
Can a "GROUP BY" clause use columns not in the SELECT?
False
supportsIntegrityEnhancementFacility()
Is the SQL Integrity Enhancement Facility supported?
True
supportsLikeEscapeClause()
Is the escape character in "LIKE" clauses supported? A JDBC-compliant driver always returns true.
True
supportsLimitedOuterJoins()
Is there limited support for outer joins? (This will be true if supportFullOuterJoins is true.)
False
supportsMinimumSQLGrammar()
Is the ODBC Minimum SQL grammar supported? All JDBC-compliant drivers must return true.
True
supportsMixedCaseIdentifiers()
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-compliant driver will always return false.
False
supportsMixedCaseQuotedIdentifiers()
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-compliant driver will always return true.
False
supportsMultipleResultSets()
Are multiple ResultSets from a single execute supported?
False
supportsMultipleTransactions()
Can multiple transactions be open at once (on different connections)?
True
supportsNonNullableColumns()
Can columns be defined as non-nullable? A JDBC-compliant driver always returns true.
True
supportsOpenCursorsAcrossCommit()
Can cursors remain open across commits?
True
supportsOpenCursorsAcrossRollback()
Can cursors remain open across rollbacks?
True
supportsOpenStatementsAcrossCommit()
Can statements remain open across commits?
True
supportsOpenStatementsAcrossRollback()
Can statements remain open across rollbacks?
True
supportsOrderByUnrelated()
Can an "ORDER BY" clause use columns not in the SELECT?
False
supportsOuterJoins()
Is some form of outer join supported?
True
supportsPositionedDelete()
Is positioned DELETE supported?
True
supportsPositionedUpdate()
Is positioned UPDATE supported?
True
supportsSchemasInDataManipulation()
Can a schema name be used in a data manipulation statement?
True
supportsSchemasInIndexDefinitions()
Can a schema name be used in an index definition statement?
True
supportsSchemasInPrivilegeDefinitions()
Can a schema name be used in a privilege definition statement?
True
supportsSchemasInProcedureCalls()
Can a schema name be used in a procedure call statement?
True
supportsSchemasInTableDefinitions()
Can a schema name be used in a table definition statement?
True
supportsSelectForUpdate()
Is SELECT for UPDATE supported?
True
supportsStoredProcedures()
Are stored procedure calls using the stored procedure escape syntax supported?
True
supportsSubqueriesInComparisons()
Are subqueries in comparison expressions supported? A JDBC-compliant driver always returns true.
True
supportsSubqueriesInExists()
Are subqueries in ’exists’ expressions supported? A JDBC-compliant driver always returns true.
True
supportsSubqueriesInIns()
Are subqueries in ’in’ statements supported? A JDBC-compliant driver always returns true.
True
supportsSubqueriesInQuantifieds()
Are subqueries in quantified expressions supported? A JDBC-compliant driver always returns true.
True
supportsTableCorrelationNames()
Are table correlation names supported? A JDBC-compliant driver always returns true.
True
supportsTransactionIsolationLevel(int)
Does the database support the given transaction isolation level?
True (for all four transaction levels)
supportsTransactions ()
Are transactions supported? If not, commit is a no-op and the isolation level is TRANSACTION_NONE.
True
supportsUnion()
Is SQL UNION supported?
True
supportsUnionAll()
Is SQL UNION ALL supported?
True
usesLocalFilePerTable()
Does the database use a file for each table?
False
usesLocalFiles()
Does the database store tables in a local file?
False

EXAMPLE

The following example shows an excerpt from ProgressTest.java that illustrates calling methods of DatabaseMetadata:

 Connection con = DriverManager.getConnection ( url, prop);

                               .
                               .
                               .

            // Get the DatabaseMetaData object and display
            // some information about the connection
            
            DatabaseMetaData dma = con.getMetaData ();

            o.println("\nConnected to " + dma.getURL());
            o.println("Driver       " + 
            						dma.getDriverName());
            o.println("Version      " +
             						dma.getDriverVersion()); 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095