The com.ibm.db2.jcc.DB2DatabaseMetaData interface extends the java.sql.DatabaseMetaData interface.
The following methods are defined only for the IBM® Data Server Driver for JDBC and SQLJ.
public java.sql.ResultSet getDBFunctionColumns(
String catalog,
String schemaPattern,
String modulePattern,
String functionNamePattern,
String columnNamePattern)
throws java.sql.SQLException
Returns a ResultSet object that describes parameters and return values for user-defined functions or built-in functions that are defined at a data source. The function parameters and return values for which information is returned match the catalog name, schema pattern, module pattern, function name pattern, and column name pattern that are specified by the input parameters. The ResultSet has the following columns:
Column number | Column name | Data type | Description |
---|---|---|---|
1 | FUNCTION_CAT | String | Name of the catalog. The value is null if this function does not have catalogs. |
2 | FUNCTION_SCHEM | String | Name of the schema containing FUNCTION_NAME. This value can be null. |
3 | FUNCTION_NAME | String | Name of the function. |
4 | COLUMN_NAME | String | Name of the function parameter. |
5 | COLUMN_TYPE | Short | Parameter type:
|
6 | DATA_TYPE | int | SQL data type of the parameter that is identified by COLUMN_NAME. |
7 | TYPE_NAME | String | Character string representing the name of the data type corresponding to DATA_TYPE. |
8 | PRECISION | int | The precision of an exact numeric parameter. |
9 | LENGTH | int | The length of the parameter, |
10 | SCALE | short | The scale of an exact numeric parameter. |
11 | RADIX | short | 10, 2, or null:
|
12 | NULLABLE | short | Specifies whether the parameter can contain
NULL values:
|
13 | REMARKS | String | Descriptive information about the parameter, or null. |
14 | CHAR_OCTET_LENGTH | int | For character data types, the maximum number of bytes in the parameter. For the XML type, zero is returned. For all other data types, this value is null. |
15 | ORDINAL_POSITION | int | The position of the parameter, starting at 1. This value is 0 if COLUMN_TYPE is 5 (return value). |
16 | IS_NULLABLE | String | Contains the string 'NO' if the parameter is known to be not nullable, 'YES' if the parameter is nullable, or an empty string if the nullability is unknown. |
17 | SPECIFIC_NAME | String | The name that uniquely identifies the function within its schema. |
18 | FUNCTION_MODULE | String | The name of the module that contains the function. This value can be null. |
The value can identify a single schema name, or it can identify more than one schema name by including the pattern-matching character percent (%).
The value can identify a single module name, or it can identify more than one module name by including the pattern-matching character percent (%).
The value can identify a single schema name, or it can identify more than one procedure name by including the pattern-matching character percent (%).
The value can identify a single schema name, or it can identify more than one parameter name by including the pattern-matching character percent (%).
This method applies to connections to DB2® for Linux, UNIX, and Windows 9.7 or later data sources only. A SqlFeatureNotSupportedException is thrown if the data source is any other data source.
public java.sql.ResultSet getDBFunctions(
String catalog,
String schemaPattern,
String modulePattern,
String functionNamePattern)
throws java.sql.SQLException
Returns a ResultSet object that describes user-defined functions or built-in functions that are defined at a data source. The functions for which information is returned match the catalog name, schema pattern, module pattern, and function name pattern that are specified by the input parameters. The ResultSet has the following columns:
Column number | Column name | Data type | Description |
---|---|---|---|
1 | FUNCTION_CAT | String | Name of the catalog. The value is null if this function does not have catalogs. |
2 | FUNCTION_SCHEM | String | Name of the schema containing FUNCTION_NAME. This value can be null. |
3 | FUNCTION_NAME | String | Name of the function. |
4 | REMARKS | String | Descriptive information about the parameter, or null. |
5 | FUNCTION_TYPE | short | Function type. Possible values are:
|
6 | SPECIFIC_NAME | String | The name that uniquely identifies the function within its schema. |
7 | FUNCTION_MODULE | String | The name of the module that contains the function. This value can be null. |
The value can identify a single schema name, or it can identify more than one schema name by including the pattern-matching character percent (%).
The value can identify a single module name, or it can identify more than one module name by including the pattern-matching character percent (%).
The value can identify a single schema name, or it can identify more than one function name by including the pattern-matching character percent (%).
This method applies to connections to DB2 for Linux, UNIX, and Windows 9.7 or later data sources only. A SqlFeatureNotSupportedException is thrown if the data source is any other data source.
public java.sql.ResultSet getDBProcedureColumns(
String catalog,
String schemaPattern,
String modulePattern,
String procedureNamePattern,
String columnNamePattern)
throws java.sql.SQLException
Returns a ResultSet object that describes parameters and return values for stored procedures that are defined at a data source. The stored procedure parameters and return values for which information is returned match the catalog name, schema pattern, module pattern, procedure name pattern, and column name pattern that are specified by the input parameters. The ResultSet has the following columns:
Column number | Column name | Data type | Description |
---|---|---|---|
1 | PROCEDURE_CAT | String | Name of the catalog. The value is null if this procedure does not have catalogs. |
2 | PROCEDURE_SCHEM | String | Name of the schema containing PROCEDURE_NAME. This value can be null. |
3 | PROCEDURE_NAME | String | Name of the procedure. |
4 | COLUMN_NAME | String | Name of the procedure parameter. |
5 | COLUMN_TYPE | Short | Parameter type:
|
6 | DATA_TYPE | int | SQL data type of the parameter that is identified by COLUMN_NAME. |
7 | TYPE_NAME | String | Character string representing the name of the data type corresponding to DATA_TYPE. |
8 | PRECISION | int | The precision of an exact numeric parameter. |
9 | LENGTH | int | The length of the parameter, |
10 | SCALE | short | The scale of an exact numeric parameter. |
11 | RADIX | short | 10, 2, or null:
|
12 | NULLABLE | short | Specifies whether the parameter can contain
NULL values:
|
13 | REMARKS | String | Descriptive information about the parameter, or null. |
14 | COLUMN_DEF | String | Default value for the parameter. |
15 | SQL_DATA_TYPE | int | The value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. |
16 | SQL_DATETIME_SUB | int | The subtype code for datetime data types. |
17 | CHAR_OCTET_LENGTH | int | For character data types, the maximum number of bytes in the parameter. For the XML type, zero is returned. For all other data types, this value is null. |
18 | ORDINAL_POSITION | int | The position of the parameter, starting at 1. This value is 0 if COLUMN_TYPE is 5 (return value). |
19 | IS_NULLABLE | String | Contains the string 'NO' if the parameter is known to be not nullable, 'YES' if the parameter is nullable, or an empty string if the nullability is unknown. |
20 | SPECIFIC_NAME | String | The name that uniquely identifies the procedure within its schema. |
21 | PROCEDURE_MODULE | String | The name of the module that contains the procedure. This value can be null. |
The value can identify a single schema name, or it can identify more than one schema name by including the pattern-matching character percent (%).
The value can identify a single module name, or it can identify more than one module name by including the pattern-matching character percent (%).
The value can identify a single schema name, or it can identify more than one procedure name by including the pattern-matching character percent (%).
The value can identify a single schema name, or it can identify more than one parameter name by including the pattern-matching character percent (%).
This method applies to connections to DB2 for Linux, UNIX, and Windows 9.7 or later data sources only. A SqlFeatureNotSupportedException is thrown if the data source is any other data source.
public java.sql.ResultSet getDBProcedures(
String catalog,
String schemaPattern,
String modulePattern,
String procedureNamePattern)
throws java.sql.SQLException
Returns a ResultSet object that describes stored procedures that are defined at a data source. The stored procedures for which information is returned match the catalog name, schema pattern, module pattern, and procedure name pattern that are specified by the input parameters. The ResultSet has the following columns:
Column number | Column name | Data type | Description |
---|---|---|---|
1 | PROCEDURE_CAT | String | Name of the catalog. The value is null if this procedure does not have catalogs. |
2 | PROCEDURE_SCHEM | String | Name of the schema containing PROCEDURE_NAME. This value can be null. |
3 | PROCEDURE_NAME | String | Name of the procedure. |
4 | Reserved. | ||
5 | Reserved. | ||
6 | Reserved. | ||
7 | REMARKS | String | Descriptive information about the parameter, or null. |
8 | PROCEDURE_TYPE | short | Procedure type. Possible values are:
|
9 | SPECIFIC_NAME | String | The name that uniquely identifies the procedure within its schema. |
10 | PROCEDURE_MODULE | String | The name of the module that contains the procedure. This value can be null. |
The value can identify a single schema name, or it can identify more than one schema name by including the pattern-matching character percent (%).
The value can identify a single module name, or it can identify more than one module name by including the pattern-matching character percent (%).
The value can identify a single schema name, or it can identify more than one procedure name by including the pattern-matching characters percent (%).
This method applies to connections to DB2 for Linux, UNIX, and Windows 9.7 or later data sources only. A SqlFeatureNotSupportedException is thrown if the data source is any other data source.
public java.sql.ResultSet getDBUDTs(
String catalog,
String schemaPattern,
String modulePattern,
String typeNamePattern,
int[] types)
throws java.sql.SQLException
Returns a ResultSet object that describes user-defined types that are defined at a data source. The user-defined types for which information is returned match the catalog name, schema pattern, module pattern, type name pattern and types that are specified by the input parameters. The ResultSet has the following columns:
Column number | Column name | Data type | Description |
---|---|---|---|
1 | TYPE_CAT | String | Name of the catalog. The value is null if this user-defined type does not have catalogs. |
2 | TYPE_SCHEM | String | Name of the schema containing TYPE_NAME. This value can be null. |
3 | TYPE_NAME | String | Name of the user-defined type. |
4 | CLASS_NAME | String | The Java™ class name of the user-defined type. |
5 | DATA_TYPE | int | One of the following type values that is defined
in java.sql.Types:
|
6 | REMARKS | String | Descriptive information about the user-defined type, or null. |
7 | BASE_TYPE | short | If DATA_TYPE is DISTINCT, or DATA_TYPE is STRUCT and REFERENCE_GENERATION is USER_DEFINED, the type code from java.sql.Types of the data type on which the user-defined type is based. Otherwise, this value is null. |
8 | TYPE_MODULE | String | The name of the module that contains the user-defined type. This value can be null. |
The value can identify a single schema name, or it can identify more than one schema name by including the pattern-matching character percent (%).
The value can identify a single module name, or it can identify more than one module name by including the pattern-matching characte percent (%).
The value can identify a single type name, or it can identify more than one procedure name by including the pattern-matching character percent (%).
If the array is null, information about all types is returned.
This method applies to connections to DB2 for Linux, UNIX, and Windows 9.7 or later data sources only. A SqlFeatureNotSupportedException is thrown if the data source is any other data source.
public boolean isIDSDatabaseAnsiCompliant();
Returns true if the current active IBM Informix® database is ANSI-compliant. Returns false otherwise.
An ANSI-compliant database is a database that was created with the WITH LOG MODE ANSI option.
This method applies to connections to IBM Informix data sources only. An SQLException is thrown if the data source is not an IBM Informix data source.
public boolean isIDSDatabaseLogging();
Returns true if the current active IBM Informix database supports logging. Returns false otherwise.
An IBM Informix database that supports logging is a database that was created with the WITH LOG MODE ANSI option, the WITH BUFFERED LOG, or the WITH LOG option.
This method applies to connections to IBM Informix data sources only. An SQLException is thrown if the data source is not an IBM Informix data source.
public boolean isResetRequiredForDB2eWLM();
Returns true if the target database server requires clean reuse to support eWLM. Returns false otherwise.
public boolean supportsDB2ProgressiveStreaming();
Returns true if the target data source supports progressive streaming. Returns false otherwise.