Class DatabaseMetaDataUsingInfoSchema

java.lang.Object
com.mysql.jdbc.DatabaseMetaData
com.mysql.jdbc.DatabaseMetaDataUsingInfoSchema
All Implemented Interfaces:
DatabaseMetaData, Wrapper
Direct Known Subclasses:
JDBC4DatabaseMetaDataUsingInfoSchema

public class DatabaseMetaDataUsingInfoSchema extends DatabaseMetaData
DatabaseMetaData implementation that uses INFORMATION_SCHEMA available in MySQL-5.0 and newer.
  • Constructor Details

  • Method Details

    • executeMetadataQuery

      protected ResultSet executeMetadataQuery(PreparedStatement pStmt) throws SQLException
      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:

      1. TABLE_CAT String => table catalog (may be null)
      2. TABLE_SCHEM String => table schema (may be null)
      3. TABLE_NAME String => table name
      4. COLUMN_NAME String => column name
      5. GRANTOR => grantor of access (may be null)
      6. GRANTEE String => grantee of access
      7. PRIVILEGE String => name of access (SELECT, INSERT, UPDATE, REFRENCES, ...)
      8. IS_GRANTABLE String => "YES" if grantee is permitted to grant to others; "NO" if not; null if unknown

      Specified by:
      getColumnPrivileges in interface DatabaseMetaData
      Overrides:
      getColumnPrivileges in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schema - a schema name; "" retrieves those without a schema
      table - a table name
      columnNamePattern - 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 tableName, 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:

      1. TABLE_CAT String => table catalog (may be null)
      2. TABLE_SCHEM String => table schema (may be null)
      3. TABLE_NAME String => table name
      4. COLUMN_NAME String => column name
      5. DATA_TYPE short => SQL type from java.sql.Types
      6. TYPE_NAME String => Data source dependent type name
      7. 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.
      8. BUFFER_LENGTH is not used.
      9. DECIMAL_DIGITS int => the number of fractional digits
      10. NUM_PREC_RADIX int => Radix (typically either 10 or 2)
      11. NULLABLE int => is NULL allowed?
        • columnNoNulls - might not allow NULL values
        • columnNullable - definitely allows NULL values
        • columnNullableUnknown - nullability unknown
      12. REMARKS String => comment describing column (may be null)
      13. COLUMN_DEF String => default value (may be null)
      14. SQL_DATA_TYPE int => unused
      15. SQL_DATETIME_SUB int => unused
      16. CHAR_OCTET_LENGTH int => for char types the maximum number of bytes in the column
      17. ORDINAL_POSITION int => index of column in table (starting at 1)
      18. 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:
      getColumns in interface DatabaseMetaData
      Overrides:
      getColumns in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schemaPattern - a schema name pattern; "" retrieves those without a schema
      tableName - a table name pattern
      columnNamePattern - a column name pattern
      Returns:
      ResultSet each row is a column description
      Throws:
      SQLException - if a database access error occurs
      See Also:
    • 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:

      1. PKTABLE_CAT String => primary key table catalog (may be null)
      2. PKTABLE_SCHEM String => primary key table schema (may be null)
      3. PKTABLE_NAME String => primary key table name
      4. PKCOLUMN_NAME String => primary key column name
      5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
      6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
      7. FKTABLE_NAME String => foreign key table name being exported
      8. FKCOLUMN_NAME String => foreign key column name being exported
      9. KEY_SEQ short => sequence number within foreign key
      10. 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
      11. 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
      12. FK_NAME String => foreign key identifier (may be null)
      13. PK_NAME String => primary key identifier (may be null)

      Specified by:
      getCrossReference in interface DatabaseMetaData
      Overrides:
      getCrossReference in class DatabaseMetaData
      Parameters:
      primaryCatalog - a catalog name; "" retrieves those without a catalog
      primarySchema - a schema name pattern; "" retrieves those without a schema
      primaryTable - a table name
      foreignCatalog - a catalog name; "" retrieves those without a catalog
      foreignSchema - a schema name pattern; "" retrieves those without a schema
      foreignTable - a table name
      Returns:
      ResultSet each row is a foreign key column description
      Throws:
      SQLException - if a database access error occurs
    • getExportedKeys

      public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
      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:

      1. PKTABLE_CAT String => primary key table catalog (may be null)
      2. PKTABLE_SCHEM String => primary key table schema (may be null)
      3. PKTABLE_NAME String => primary key table name
      4. PKCOLUMN_NAME String => primary key column name
      5. FKTABLE_CAT String => foreign key table catalog (may be null) being exported (may be null)
      6. FKTABLE_SCHEM String => foreign key table schema (may be null) being exported (may be null)
      7. FKTABLE_NAME String => foreign key table name being exported
      8. FKCOLUMN_NAME String => foreign key column name being exported
      9. KEY_SEQ short => sequence number within foreign key
      10. 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
      11. 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
      12. FK_NAME String => foreign key identifier (may be null)
      13. PK_NAME String => primary key identifier (may be null)

      Specified by:
      getExportedKeys in interface DatabaseMetaData
      Overrides:
      getExportedKeys in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schema - a schema name pattern; "" retrieves those without a schema
      table - a table name
      Returns:
      ResultSet each row is a foreign key column description
      Throws:
      SQLException - if a database access error occurs
      See Also:
    • getImportedKeys

      public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException
      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:

      1. PKTABLE_CAT String => primary key table catalog being imported (may be null)
      2. PKTABLE_SCHEM String => primary key table schema being imported (may be null)
      3. PKTABLE_NAME String => primary key table name being imported
      4. PKCOLUMN_NAME String => primary key column name being imported
      5. FKTABLE_CAT String => foreign key table catalog (may be null)
      6. FKTABLE_SCHEM String => foreign key table schema (may be null)
      7. FKTABLE_NAME String => foreign key table name
      8. FKCOLUMN_NAME String => foreign key column name
      9. KEY_SEQ short => sequence number within foreign key
      10. 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
      11. 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
      12. FK_NAME String => foreign key name (may be null)
      13. PK_NAME String => primary key name (may be null)

      Specified by:
      getImportedKeys in interface DatabaseMetaData
      Overrides:
      getImportedKeys in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schema - a schema name pattern; "" retrieves those without a schema
      table - a table name
      Returns:
      ResultSet each row is a primary key column description
      Throws:
      SQLException - if a database access error occurs
      See Also:
    • 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:

      1. TABLE_CAT String => table catalog (may be null)
      2. TABLE_SCHEM String => table schema (may be null)
      3. TABLE_NAME String => table name
      4. NON_UNIQUE boolean => Can index values be non-unique? false when TYPE is tableIndexStatistic
      5. INDEX_QUALIFIER String => index catalog (may be null); null when TYPE is tableIndexStatistic
      6. INDEX_NAME String => index name; null when TYPE is tableIndexStatistic
      7. 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
      8. ORDINAL_POSITION short => column sequence number within index; zero when TYPE is tableIndexStatistic
      9. COLUMN_NAME String => column name; null when TYPE is tableIndexStatistic
      10. 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
      11. CARDINALITY int => 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.
      12. PAGES int => 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.
      13. FILTER_CONDITION String => Filter condition, if any. (may be null)

      Specified by:
      getIndexInfo in interface DatabaseMetaData
      Overrides:
      getIndexInfo in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schema - a schema name pattern; "" retrieves those without a schema
      table - a table name
      unique - when true, return only indices for unique values; when false, return indices regardless of whether unique or not
      approximate - 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
    • getPrimaryKeys

      public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException
      Get a description of a table's primary key columns. They are ordered by COLUMN_NAME.

      Each column description has the following columns:

      1. TABLE_CAT String => table catalog (may be null)
      2. TABLE_SCHEM String => table schema (may be null)
      3. TABLE_NAME String => table name
      4. COLUMN_NAME String => column name
      5. KEY_SEQ short => sequence number within primary key
      6. PK_NAME String => primary key name (may be null)

      Specified by:
      getPrimaryKeys in interface DatabaseMetaData
      Overrides:
      getPrimaryKeys in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schema - a schema name pattern; "" retrieves those without a schema
      table - a table name
      Returns:
      ResultSet each row is a primary key column description
      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:

      1. PROCEDURE_CAT String => procedure catalog (may be null)
      2. PROCEDURE_SCHEM String => procedure schema (may be null)
      3. PROCEDURE_NAME String => procedure name
      4. reserved for future use
      5. reserved for future use
      6. reserved for future use
      7. REMARKS String => explanatory comment on the procedure
      8. PROCEDURE_TYPE short => kind of procedure:
        • procedureResultUnknown - May return a result
        • procedureNoResult - Does not return a result
        • procedureReturnsResult - Returns a result

      Specified by:
      getProcedures in interface DatabaseMetaData
      Overrides:
      getProcedures in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schemaPattern - a schema name pattern; "" retrieves those without a schema
      procedureNamePattern - a procedure name pattern
      Returns:
      ResultSet each row is a procedure description
      Throws:
      SQLException - if a database access error occurs
      See Also:
    • getRoutineTypeConditionForGetProcedures

      protected String getRoutineTypeConditionForGetProcedures()
      Returns a condition to be injected in the query that returns metadata for procedures only. Overridden by subclasses when needed. When not empty must end with "AND ".
      Returns:
      String with the condition to be injected.
    • getProcedureColumns

      public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException
      Retrieves a description of the given catalog's stored procedure parameter 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:

      1. PROCEDURE_CAT String => procedure catalog (may be null)
      2. PROCEDURE_SCHEM String => procedure schema (may be null)
      3. PROCEDURE_NAME String => procedure name
      4. COLUMN_NAME String => column/parameter name
      5. 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
      6. DATA_TYPE int => SQL type from java.sql.Types
      7. TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
      8. PRECISION int => precision
      9. LENGTH int => length in bytes of data
      10. SCALE short => scale
      11. RADIX short => radix
      12. NULLABLE short => can it contain NULL.
        • procedureNoNulls - does not allow NULL values
        • procedureNullable - allows NULL values
        • procedureNullableUnknown - nullability unknown
      13. REMARKS String => comment describing parameter/column

      Note: Some databases may not return the column descriptions for a procedure. Additional columns beyond REMARKS can be defined by the database.

      Specified by:
      getProcedureColumns in interface DatabaseMetaData
      Overrides:
      getProcedureColumns in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database
      columnNamePattern - a column name pattern; must match the column name as it is stored in the database
      Returns:
      ResultSet - each row describes a stored procedure parameter or column
      Throws:
      SQLException - if a database access error occurs
      See Also:
    • getProcedureColumnsNoISParametersView

      protected ResultSet getProcedureColumnsNoISParametersView(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException
      Redirects to another implementation of #getProcedureColumns. Subclasses may need to override this method.
      Throws:
      SQLException
      See Also:
    • getRoutineTypeConditionForGetProcedureColumns

      protected String getRoutineTypeConditionForGetProcedureColumns()
      Returns a condition to be injected in the query that returns metadata for procedure columns only. Overridden by subclasses when needed. When not empty must end with "AND ".
      Returns:
      String with the condition to be injected.
    • 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:

      1. TABLE_CAT String => table catalog (may be null)
      2. TABLE_SCHEM String => table schema (may be null)
      3. TABLE_NAME String => table name
      4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
      5. REMARKS String => explanatory comment on the table

      Note: Some databases may not return information for all tables.

      Specified by:
      getTables in interface DatabaseMetaData
      Overrides:
      getTables in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schemaPattern - a schema name pattern; "" retrieves those without a schema
      tableNamePattern - a table name pattern
      types - a list of table types to include; null returns all types
      Returns:
      ResultSet each row is a table description
      Throws:
      SQLException
      See Also:
    • gethasParametersView

      public boolean gethasParametersView()
    • getVersionColumns

      public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException
      Description copied from class: DatabaseMetaData
      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:

      1. SCOPE short => is not used
      2. COLUMN_NAME String => column name
      3. DATA_TYPE short => SQL data type from java.sql.Types
      4. TYPE_NAME String => Data source dependent type name
      5. COLUMN_SIZE int => precision
      6. BUFFER_LENGTH int => length of column value in bytes
      7. DECIMAL_DIGITS short => scale
      8. 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:
      getVersionColumns in interface DatabaseMetaData
      Overrides:
      getVersionColumns in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; "" retrieves those without a catalog
      schema - a schema name; "" retrieves those without a schema
      table - a table name
      Returns:
      ResultSet each row is a column description
      Throws:
      SQLException
    • 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.

      Only descriptions matching the schema, function and parameter name criteria are returned. They are ordered by FUNCTION_CAT, FUNCTION_SCHEM, FUNCTION_NAME and SPECIFIC_ 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, column description or return type description with the following fields:

      1. FUNCTION_CAT String => function catalog (may be null)
      2. FUNCTION_SCHEM String => function schema (may be null)
      3. FUNCTION_NAME String => function name. This is the name used to invoke the function
      4. COLUMN_NAME String => column/parameter name
      5. COLUMN_TYPE Short => kind of column/parameter:
        • functionColumnUnknown - nobody knows
        • functionColumnIn - IN parameter
        • functionColumnInOut - INOUT parameter
        • functionColumnOut - OUT parameter
        • functionColumnReturn - function return value
        • functionColumnResult - Indicates that the parameter or column is a column in the ResultSet
      6. DATA_TYPE int => SQL type from java.sql.Types
      7. TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
      8. PRECISION int => precision
      9. LENGTH int => length in bytes of data
      10. SCALE short => scale - null is returned for data types where SCALE is not applicable.
      11. RADIX short => radix
      12. NULLABLE short => can it contain NULL.
        • functionNoNulls - does not allow NULL values
        • functionNullable - allows NULL values
        • functionNullableUnknown - nullability unknown
      13. REMARKS String => comment describing column/parameter
      14. CHAR_OCTET_LENGTH int => the maximum length of binary and character based parameters or columns. For any other datatype the returned value is a NULL
      15. ORDINAL_POSITION int => the ordinal position, starting from 1, for the input and output parameters. A value of 0 is returned if this row describes the function's return value. For result set columns, it is the ordinal position of the column in the result set starting from 1.
      16. IS_NULLABLE String => ISO rules are used to determine the nullability for a parameter or column.
        • YES --- if the parameter or column can include NULLs
        • NO --- if the parameter or column cannot include NULLs
        • empty string --- if the nullability for the parameter or column is unknown
      17. 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_NAME for example with overload functions

      The PRECISION column represents the specified column size for the given parameter or column. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. Null is returned for data types where the column size is not applicable.

      Specified by:
      getFunctionColumns in interface DatabaseMetaData
      Overrides:
      getFunctionColumns in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      functionNamePattern - a procedure name pattern; must match the function name as it is stored in the database
      columnNamePattern - a parameter name pattern; must match the parameter or column name as it is stored in the database
      Returns:
      ResultSet - each row describes a user function parameter, column or return type
      Throws:
      SQLException - if a database access error occurs
      Since:
      1.6
      See Also:
    • getJDBC4FunctionConstant

      protected int getJDBC4FunctionConstant(DatabaseMetaDataUsingInfoSchema.JDBC4FunctionConstant constant)
      Getter to JDBC4 DatabaseMetaData.function* constants. This method must be overridden by JDBC4 subclasses. this implementation should never be called.
      Parameters:
      constant - the constant id from DatabaseMetaData fields to return.
      Returns:
      0
    • 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_NAME and SPECIFIC_ NAME.

      Each function description has the the following columns:

      1. FUNCTION_CAT String => function catalog (may be null)
      2. FUNCTION_SCHEM String => function schema (may be null)
      3. FUNCTION_NAME String => function name. This is the name used to invoke the function
      4. REMARKS String => explanatory comment on the function
      5. 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
      6. 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_NAME for example with overload functions

      A user may not have permission to execute any of the functions that are returned by getFunctions

      Specified by:
      getFunctions in interface DatabaseMetaData
      Overrides:
      getFunctions in class DatabaseMetaData
      Parameters:
      catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search
      schemaPattern - a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
      functionNamePattern - 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:
    • getJDBC4FunctionNoTableConstant

      protected int getJDBC4FunctionNoTableConstant()
      Getter to JDBC4 DatabaseMetaData.functionNoTable constant. This method must be overridden by JDBC4 subclasses. this implementation should never be called.
      Overrides:
      getJDBC4FunctionNoTableConstant in class DatabaseMetaData
      Returns:
      0