com.amazon.redshift.jdbc

## Class MetadataServerProxy

- java.lang.Object
- - com.amazon.redshift.jdbc.MetadataAPIHelper
  - - com.amazon.redshift.jdbc.MetadataServerProxy

    public class MetadataServerProxy
    extends MetadataAPIHelper

### Nested Class Summary

### Nested classes/interfaces inherited from class com.amazon.redshift.jdbc.MetadataAPIHelper

`MetadataAPIHelper.BestRowIdenData, MetadataAPIHelper.enumFunc<T extends Enum<T>>, MetadataAPIHelper.ForeignKeyColumnIndex, MetadataAPIHelper.GetBestRowIdentifier_Metadata, MetadataAPIHelper.GetCatalogs_Metadata, MetadataAPIHelper.GetColumnPrivileges_Metadata, MetadataAPIHelper.GetColumns_Metadata, MetadataAPIHelper.GetForeignKeys_Metadata, MetadataAPIHelper.GetFunctions_Metadata, MetadataAPIHelper.GetFunctionsColumns_Metadata, MetadataAPIHelper.GetPrimaryKeys_Metadata, MetadataAPIHelper.GetProcedures_Metadata, MetadataAPIHelper.GetProceduresColumns_Metadata, MetadataAPIHelper.GetSchemas_Metadata, MetadataAPIHelper.GetTablePrivileges_Metadata, MetadataAPIHelper.GetTables_Metadata, MetadataAPIHelper.GetTableType_Metadata, MetadataAPIHelper.ProcedureFunctionColumnData, MetadataAPIHelper.RedshiftDataTypes, MetadataAPIHelper.ShowColumnsInfo, MetadataAPIHelper.ShowForeignKeysInfo, MetadataAPIHelper.ShowFunctionsInfo, MetadataAPIHelper.ShowGrantsInfo, MetadataAPIHelper.ShowParametersInfo, MetadataAPIHelper.ShowPrimaryKeysInfo, MetadataAPIHelper.ShowProceduresInfo, MetadataAPIHelper.ShowSchemasInfo, MetadataAPIHelper.ShowTablesInfo`

### Field Summary

### Fields inherited from class com.amazon.redshift.jdbc.MetadataAPIHelper

`connection, DATETIME_PRECISION_PATTERN, EMPTY_REMARKS, FUNCTION_COLUMN_TYPE_MAP, GET_BEST_ROW_IDENTIFIER_COLS, GET_CATALOGS_COLS, GET_COLUMN_PRIVILEGES_COLS, GET_COLUMNS_COLS, GET_FOREIGN_KEYS_COLS, GET_FUNCTIONS_COLS, GET_FUNCTIONS_COLUMNS_COLS, GET_PRIMARY_KEYS_COLS, GET_PROCEDURES_COLS, GET_PROCEDURES_COLUMNS_COLS, GET_SCHEMAS_COLS, GET_TABLE_PRIVILEGES_COLS, GET_TABLE_TYPE_COLS, GET_TABLES_COLS, IMPORTED_KEY_NO_ACTION, IMPORTED_KEY_NOT_DEFERRABLE, INTERVAL_PRECISION_PATTERN, IS_NULLABLE_VALUE, NULLABLE_UNKNOWN_VALUE, PRECISION_EXTRACTION_PATTERN, PRECISION_REMOVAL_PATTERN, PROCEDURE_COLUMN_TYPE_MAP, PSEUDO_COLUMN_VALUE, RADIX_VALUE, SHOW_COLUMNS_CHARACTER_MAXIMUM_LENGTH, SHOW_COLUMNS_COLLATION, SHOW_COLUMNS_COLUMN_DEFAULT, SHOW_COLUMNS_COLUMN_NAME, SHOW_COLUMNS_DATA_TYPE, SHOW_COLUMNS_DATABASE_NAME, SHOW_COLUMNS_DIST_KEY, SHOW_COLUMNS_ENCODING, SHOW_COLUMNS_IS_NULLABLE, SHOW_COLUMNS_NUMERIC_PRECISION, SHOW_COLUMNS_NUMERIC_SCALE, SHOW_COLUMNS_ORDINAL_POSITION, SHOW_COLUMNS_REMARKS, SHOW_COLUMNS_SCHEMA_NAME, SHOW_COLUMNS_SORT_KEY, SHOW_COLUMNS_SORT_KEY_TYPE, SHOW_COLUMNS_TABLE_NAME, SHOW_DATABASES_DATABASE_NAME, SHOW_FOREIGN_KEYS_DEFERRABILITY, SHOW_FOREIGN_KEYS_DELETE_RULE, SHOW_FOREIGN_KEYS_FK_COLUMN_NAME, SHOW_FOREIGN_KEYS_FK_DATABASE_NAME, SHOW_FOREIGN_KEYS_FK_NAME, SHOW_FOREIGN_KEYS_FK_SCHEMA_NAME, SHOW_FOREIGN_KEYS_FK_TABLE_NAME, SHOW_FOREIGN_KEYS_KEY_SEQ, SHOW_FOREIGN_KEYS_PK_COLUMN_NAME, SHOW_FOREIGN_KEYS_PK_DATABASE_NAME, SHOW_FOREIGN_KEYS_PK_NAME, SHOW_FOREIGN_KEYS_PK_SCHEMA_NAME, SHOW_FOREIGN_KEYS_PK_TABLE_NAME, SHOW_FOREIGN_KEYS_UPDATE_RULE, SHOW_FUNCTIONS_ARGUMENT_LIST, SHOW_FUNCTIONS_DATABASE_NAME, SHOW_FUNCTIONS_FUNCTION_NAME, SHOW_FUNCTIONS_RETURN_TYPE, SHOW_FUNCTIONS_SCHEMA_NAME, SHOW_GRANT_ADMIN_OPTION, SHOW_GRANT_COLUMN_NAME, SHOW_GRANT_DATABASE_NAME, SHOW_GRANT_GRANTOR, SHOW_GRANT_IDENTITY_NAME, SHOW_GRANT_OBJECT_NAME, SHOW_GRANT_PRIVILEGE_TYPE, SHOW_GRANT_SCHEMA_NAME, SHOW_GRANT_TABLE_NAME, SHOW_PARAMETERS_CHARACTER_MAXIMUM_LENGTH, SHOW_PARAMETERS_DATA_TYPE, SHOW_PARAMETERS_DATABASE_NAME, SHOW_PARAMETERS_FUNCTION_NAME, SHOW_PARAMETERS_NUMERIC_PRECISION, SHOW_PARAMETERS_NUMERIC_SCALE, SHOW_PARAMETERS_ORDINAL_POSITION, SHOW_PARAMETERS_PARAMETER_NAME, SHOW_PARAMETERS_PARAMETER_TYPE, SHOW_PARAMETERS_PROCEDURE_NAME, SHOW_PARAMETERS_SCHEMA_NAME, SHOW_PRIMARY_KEYS_COLUMN_NAME, SHOW_PRIMARY_KEYS_DATABASE_NAME, SHOW_PRIMARY_KEYS_KEY_SEQ, SHOW_PRIMARY_KEYS_PK_NAME, SHOW_PRIMARY_KEYS_SCHEMA_NAME, SHOW_PRIMARY_KEYS_TABLE_NAME, SHOW_PROCEDURES_ARGUMENT_LIST, SHOW_PROCEDURES_DATABASE_NAME, SHOW_PROCEDURES_PROCEDURE_NAME, SHOW_PROCEDURES_RETURN_TYPE, SHOW_PROCEDURES_SCHEMA_NAME, SHOW_SCHEMAS_DATABASE_NAME, SHOW_SCHEMAS_SCHEMA_NAME, SHOW_TABLES_DATABASE_NAME, SHOW_TABLES_DIST_STYLE, SHOW_TABLES_LAST_ALTERED_TIME, SHOW_TABLES_LAST_MODIFIED_TIME, SHOW_TABLES_OWNER, SHOW_TABLES_REMARKS, SHOW_TABLES_SCHEMA_NAME, SHOW_TABLES_TABLE_NAME, SHOW_TABLES_TABLE_SUBTYPE, SHOW_TABLES_TABLE_TYPE, SQL_LIKE, SQL_PREP_SHOWCOLUMNS, SQL_PREP_SHOWCOLUMNSLIKE, SQL_PREP_SHOWDATABASES, SQL_PREP_SHOWFOREIGNEXPORTEDKEYS, SQL_PREP_SHOWFOREIGNKEYS, SQL_PREP_SHOWFUNCTIONS, SQL_PREP_SHOWFUNCTIONSLIKE, SQL_PREP_SHOWGRANTSCOLUMN, SQL_PREP_SHOWGRANTSCOLUMNLIKE, SQL_PREP_SHOWGRANTSTABLE, SQL_PREP_SHOWPARAMETERSFUNCTION, SQL_PREP_SHOWPARAMETERSPROCEDURE, SQL_PREP_SHOWPRIMARYKEYS, SQL_PREP_SHOWPROCEDURES, SQL_PREP_SHOWPROCEDURESLIKE, SQL_PREP_SHOWSCHEMAS, SQL_PREP_SHOWSCHEMASLIKE, SQL_PREP_SHOWTABLES, SQL_PREP_SHOWTABLESLIKE, SQL_SEMICOLON, TRAILING_SPACES_PATTERN`

### Constructor Summary

Constructors
Constructor and Description
`MetadataServerProxy(RedshiftConnectionImpl connection)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected List<MetadataAPIHelper.ShowColumnsInfo>` `callShowColumns(String catalog, String schema, String table, String columnNamePattern)` Helper function to get a ResultSet for SHOW COLUMNS
`protected List<MetadataAPIHelper.ShowForeignKeysInfo>` `callShowConstraintsForeignKey(String catalog, String schema, String table, String sql)` Helper function to get a ResultSet for Show Constraint Foreign Key
`protected List<MetadataAPIHelper.ShowPrimaryKeysInfo>` `callShowConstraintsPrimaryKey(String catalog, String schema, String table)` Helper function to get a ResultSet of Show Constraint Primary Key
`protected List<MetadataAPIHelper.ShowFunctionsInfo>` `callShowFunctions(String catalog, String schema, String functionNamePattern, boolean fullResult)` Helper function to get a ResultSet for SHOW FUNCTIONS
`protected List<MetadataAPIHelper.ShowProceduresInfo>` `callShowProcedures(String catalog, String schema, String procedureNamePattern, boolean fullResult)` Helper function to get a ResultSet for SHOW PROCEDURES
`protected List<MetadataAPIHelper.ShowSchemasInfo>` `callShowSchemas(String catalog, String schemaPattern, boolean fullResult)` Helper function to get a ResultSet for SHOW SCHEMAS
`protected List<MetadataAPIHelper.ShowTablesInfo>` `callShowTables(String catalog, String schema, String tableNamePattern, boolean fullResult)` Helper function to get a ResultSet for SHOW TABLES
`protected List<String>` `fetchCatalogNames(String catalog, boolean isSingleDatabaseMetaData)` Retrieves a list of database/catalog names.
`List<MetadataAPIHelper.BestRowIdenData>` `getBestRowIdentifier(String catalog, String schema, String table, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for Best Row Identifier
`protected List<String>` `getCatalogs()` Returns a Result set for SHOW DATABASES
`List<MetadataAPIHelper.ShowGrantsInfo>` `getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW GRANTS ON COLUMN
`protected List<MetadataAPIHelper.ShowColumnsInfo>` `getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW COLUMNS
`protected List<MetadataAPIHelper.ShowForeignKeysInfo>` `getForeignKeys(String catalog, String schema, String table, boolean isSingleDatabaseMetaData, boolean isImported)` Returns a list of intermediate result set for SHOW CONSTRAINTS FOREIGN KEY
`protected List<MetadataAPIHelper.ProcedureFunctionColumnData>` `getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW COLUMNS FROM FUNCTION
`protected List<MetadataAPIHelper.ShowFunctionsInfo>` `getFunctions(String catalog, String schemaPattern, String functionNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW FUNCTIONS
`protected List<MetadataAPIHelper.ShowPrimaryKeysInfo>` `getPrimaryKeys(String catalog, String schema, String table, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW CONSTRAINTS PRIMARY KEY
`protected List<MetadataAPIHelper.ProcedureFunctionColumnData>` `getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW COLUMNS FROM PROCEDURE
`List<MetadataAPIHelper.ShowProceduresInfo>` `getProcedures(String catalog, String schemaPattern, String procedureNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW PROCEDURES
`protected List<MetadataAPIHelper.ShowSchemasInfo>` `getSchemas(String catalog, String schemaPattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW SCHEMAS
`List<MetadataAPIHelper.ShowGrantsInfo>` `getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW GRANTS ON TABLE
`protected List<MetadataAPIHelper.ShowTablesInfo>` `getTables(String catalog, String schemaPattern, String tableNamePattern, boolean isSingleDatabaseMetaData)` Returns a list of intermediate result set for SHOW TABLES

### Methods inherited from class com.amazon.redshift.jdbc.MetadataAPIHelper

`convertSqlLikeToRegex, createMetaDataPreparedStatement, createMetaDataStatement, createParameterizedQueryString, createRs, encodeStr, getAutoIncrement, getColumnLength, getColumnSize, getDecimalDigit, getEmptyTuple, getField, getFunctionColumnType, getFunctionType, getIsGrantable, getNullable, getNumPrefixRadix, getProcedureColumnType, getProcedureType, getRSType, getSpecificName, getSQLType, patternMatch, runQuery, sortForeignKeyTuples`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MetadataServerProxy

    public MetadataServerProxy(RedshiftConnectionImpl connection)
                        throws SQLException

Throws:
  `SQLException`

### Method Detail

#### getCatalogs

    protected List<String> getCatalogs()
                                throws SQLException

Returns a Result set for SHOW DATABASES

Returns:
  the result set for SHOW DATABASES
Throws:
  `SQLException` - if a database error occurs

#### getSchemas

    protected List<MetadataAPIHelper.ShowSchemasInfo> getSchemas(String catalog,
                                                                 String schemaPattern,
                                                                 boolean isSingleDatabaseMetaData)
                                                          throws SQLException

Returns a list of intermediate result set for SHOW SCHEMAS

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; null means that the catalog name should not be used to narrow the search
  `schemaPattern` - a schema pattern; must match the schema name as it is stored in the database; null means that the schema name should not be used to narrow the search
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for SHOW SCHEMAS
Throws:
  `SQLException` - if a database error occurs

#### getTables

    protected List<MetadataAPIHelper.ShowTablesInfo> getTables(String catalog,
                                                               String schemaPattern,
                                                               String tableNamePattern,
                                                               boolean isSingleDatabaseMetaData)
                                                        throws SQLException

Returns a list of intermediate result set for SHOW TABLES

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; null means that the schema name should not be used to narrow the search
  `tableNamePattern` - a table name pattern; must match the table name as it is stored in the database
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for SHOW TABLES
Throws:
  `SQLException` - if a database error occurs

#### getColumns

    protected List<MetadataAPIHelper.ShowColumnsInfo> getColumns(String catalog,
                                                                 String schemaPattern,
                                                                 String tableNamePattern,
                                                                 String columnNamePattern,
                                                                 boolean isSingleDatabaseMetaData)
                                                          throws SQLException

Returns a list of intermediate result set for SHOW COLUMNS

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; null means that the schema name should not be used to narrow the search
  `tableNamePattern` - a table name pattern; must match the table 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
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for SHOW COLUMNS
Throws:
  `SQLException` - if a database error occurs

#### getPrimaryKeys

    protected List<MetadataAPIHelper.ShowPrimaryKeysInfo> getPrimaryKeys(String catalog,
                                                                         String schema,
                                                                         String table,
                                                                         boolean isSingleDatabaseMetaData)
                                                                  throws SQLException

Returns a list of intermediate result set for SHOW CONSTRAINTS PRIMARY KEY

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; null means that the catalog name should not be used to narrow the search
  `schema` - a schema name; must match the schema name as it is stored in the database; null means that the schema name should not be used to narrow the search
  `table` - a table name; must match the table name as it is stored in the database
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  a list of intermediate result set for SHOW CONSTRAINTS PRIMARY KEY
Throws:
  `SQLException` - if a database error occurs

#### getForeignKeys

    protected List<MetadataAPIHelper.ShowForeignKeysInfo> getForeignKeys(String catalog,
                                                                         String schema,
                                                                         String table,
                                                                         boolean isSingleDatabaseMetaData,
                                                                         boolean isImported)
                                                                  throws SQLException

Returns a list of intermediate result set for SHOW CONSTRAINTS FOREIGN KEY

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; null means that the catalog name should not be used to narrow the search
  `schema` - a schema name; must match the schema name as it is stored in the database; null means that the schema name should not be used to narrow the search
  `table` - a table name; must match the table name as it is stored in the database
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
  `isImported` - boolean to determine if we want to retrieve imported keys or exported keys
Returns:
  a list of intermediate result set for SHOW CONSTRAINTS FOREIGN KEY
Throws:
  `SQLException` - if a database error occurs

#### getBestRowIdentifier

    public List<MetadataAPIHelper.BestRowIdenData> getBestRowIdentifier(String catalog,
                                                                        String schema,
                                                                        String table,
                                                                        boolean isSingleDatabaseMetaData)
                                                                 throws SQLException

Returns a list of intermediate result set for Best Row Identifier

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; null means that the catalog name should not be used to narrow the search
  `schema` - a schema name; must match the schema name as it is stored in the database; null means that the schema name should not be used to narrow the search
  `table` - a table name; must match the table name as it is stored in the database
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for Best Row Identifier
Throws:
  `SQLException` - if a database error occurs

#### getColumnPrivileges

    public List<MetadataAPIHelper.ShowGrantsInfo> getColumnPrivileges(String catalog,
                                                                      String schema,
                                                                      String table,
                                                                      String columnNamePattern,
                                                                      boolean isSingleDatabaseMetaData)
                                                               throws SQLException

Returns a list of intermediate result set for SHOW GRANTS ON COLUMN

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; null means that the catalog name should not be used to narrow the search
  `schema` - a schema name; must match the schema name as it is stored in the database; null means that the schema name should not be used to narrow the search
  `table` - a table name; must match the table 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
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for COLUMN PRIVILEGES
Throws:
  `SQLException` - if a database error occurs

#### getTablePrivileges

    public List<MetadataAPIHelper.ShowGrantsInfo> getTablePrivileges(String catalog,
                                                                     String schemaPattern,
                                                                     String tableNamePattern,
                                                                     boolean isSingleDatabaseMetaData)
                                                              throws SQLException

Returns a list of intermediate result set for SHOW GRANTS ON TABLE

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; null means that the schema name should not be used to narrow the search
  `tableNamePattern` - a table name pattern; must match the table name as it is stored in the database
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for TABLE PRIVILEGES
Throws:
  `SQLException` - if a database error occurs

#### getProcedures

    public List<MetadataAPIHelper.ShowProceduresInfo> getProcedures(String catalog,
                                                                    String schemaPattern,
                                                                    String procedureNamePattern,
                                                                    boolean isSingleDatabaseMetaData)
                                                             throws SQLException

Returns a list of intermediate result set for SHOW PROCEDURES

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; 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
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for SHOW PROCEDURES
Throws:
  `SQLException` - if a database error occurs

#### getProcedureColumns

    protected List<MetadataAPIHelper.ProcedureFunctionColumnData> getProcedureColumns(String catalog,
                                                                                      String schemaPattern,
                                                                                      String procedureNamePattern,
                                                                                      String columnNamePattern,
                                                                                      boolean isSingleDatabaseMetaData)
                                                                               throws SQLException

Returns a list of intermediate result set for SHOW COLUMNS FROM PROCEDURE

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; 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
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for PROCEDURE COLUMNS
Throws:
  `SQLException` - if a database error occurs

#### getFunctions

    protected List<MetadataAPIHelper.ShowFunctionsInfo> getFunctions(String catalog,
                                                                     String schemaPattern,
                                                                     String functionNamePattern,
                                                                     boolean isSingleDatabaseMetaData)
                                                              throws SQLException

Returns a list of intermediate result set for SHOW FUNCTIONS

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; 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
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for SHOW FUNCTIONS
Throws:
  `SQLException` - if a database error occurs

#### getFunctionColumns

    protected List<MetadataAPIHelper.ProcedureFunctionColumnData> getFunctionColumns(String catalog,
                                                                                     String schemaPattern,
                                                                                     String functionNamePattern,
                                                                                     String columnNamePattern,
                                                                                     boolean isSingleDatabaseMetaData)
                                                                              throws SQLException

Returns a list of intermediate result set for SHOW COLUMNS FROM FUNCTION

Parameters:
  `catalog` - a catalog name; must match the catalog name as it is stored in the database; 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; 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
  `columnNamePattern` - a column name pattern; must match the column name as it is stored in the database
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  the list of intermediate result set for FUNCTION COLUMNS
Throws:
  `SQLException` - if a database error occurs

#### fetchCatalogNames

    protected List<String> fetchCatalogNames(String catalog,
                                             boolean isSingleDatabaseMetaData)
                                      throws SQLException

Retrieves a list of database/catalog names.

Parameters:
  `catalog` - a catalog name; null means that the catalog name should not be used to narrow the search
  `isSingleDatabaseMetaData` - boolean to determine if we want to retrieve metadata information only from current connected database
Returns:
  List of catalog names
Throws:
  `SQLException` - if a database error occurs

#### callShowSchemas

    protected List<MetadataAPIHelper.ShowSchemasInfo> callShowSchemas(String catalog,
                                                                      String schemaPattern,
                                                                      boolean fullResult)
                                                               throws SQLException

Helper function to get a ResultSet for SHOW SCHEMAS

Parameters:
  `catalog` - The name of the catalog
  `schemaPattern` - The schema name pattern
  `fullResult` - If true, returns full result for SHOW; if false, returns only schema names
Returns:
  ResultSet from SHOW SCHEMAS
Throws:
  `SQLException` - if a database error occurs

#### callShowTables

    protected List<MetadataAPIHelper.ShowTablesInfo> callShowTables(String catalog,
                                                                    String schema,
                                                                    String tableNamePattern,
                                                                    boolean fullResult)
                                                             throws SQLException

Helper function to get a ResultSet for SHOW TABLES

Parameters:
  `catalog` - The catalog name
  `schema` - The schema name
  `tableNamePattern` - The table name pattern
  `fullResult` - If true, returns full result for SHOW; if false, returns only table names
Returns:
  Resultset from SHOW TABLES
Throws:
  `SQLException` - if a database error occurs

#### callShowColumns

    protected List<MetadataAPIHelper.ShowColumnsInfo> callShowColumns(String catalog,
                                                                      String schema,
                                                                      String table,
                                                                      String columnNamePattern)
                                                               throws SQLException

Helper function to get a ResultSet for SHOW COLUMNS

Parameters:
  `catalog` - The catalog name
  `schema` - The schema name
  `table` - The table name
  `columnNamePattern` - The column name pattern
Returns:
  Resultset from SHOW COLUMNS
Throws:
  `SQLException` - if a database error occurs

#### callShowConstraintsPrimaryKey

    protected List<MetadataAPIHelper.ShowPrimaryKeysInfo> callShowConstraintsPrimaryKey(String catalog,
                                                                                        String schema,
                                                                                        String table)
                                                                                 throws SQLException

Helper function to get a ResultSet of Show Constraint Primary Key

Parameters:
  `catalog` - The catalog name
  `schema` - The schema name
  `table` - The table name
Returns:
  Resultset from SHOW CONSTRAINTS PRIMARY KEY
Throws:
  `SQLException` - if a database error occurs

#### callShowConstraintsForeignKey

    protected List<MetadataAPIHelper.ShowForeignKeysInfo> callShowConstraintsForeignKey(String catalog,
                                                                                        String schema,
                                                                                        String table,
                                                                                        String sql)
                                                                                 throws SQLException

Helper function to get a ResultSet for Show Constraint Foreign Key

Parameters:
  `catalog` - The catalog name
  `schema` - The schema name
  `table` - The table name
  `sql` - the foreign key sql query
Returns:
  Resultset from SHOW CONSTRAINTS FOREIGN KEY
Throws:
  `SQLException` - if a database error occurs

#### callShowProcedures

    protected List<MetadataAPIHelper.ShowProceduresInfo> callShowProcedures(String catalog,
                                                                            String schema,
                                                                            String procedureNamePattern,
                                                                            boolean fullResult)
                                                                     throws SQLException

Helper function to get a ResultSet for SHOW PROCEDURES

Parameters:
  `catalog` - The catalog name
  `schema` - The schema name
  `procedureNamePattern` - The procedure name pattern
  `fullResult` - If true, returns full result for SHOW; if false, returns only procedure names and argument lists
Returns:
  Resultset from SHOW PROCEDURES
Throws:
  `SQLException` - if a database error occurs

#### callShowFunctions

    protected List<MetadataAPIHelper.ShowFunctionsInfo> callShowFunctions(String catalog,
                                                                          String schema,
                                                                          String functionNamePattern,
                                                                          boolean fullResult)
                                                                   throws SQLException

Helper function to get a ResultSet for SHOW FUNCTIONS

Parameters:
  `catalog` - The catalog name
  `schema` - The schema name
  `functionNamePattern` - The function name pattern
  `fullResult` - If true, returns full result for SHOW; if false, returns only function names and argument lists
Returns:
  Resultset from SHOW FUNCTIONS
Throws:
  `SQLException` - if a database error occurs