public class MetadataAPIHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MetadataAPIHelper.enumFunc<T extends Enum<T>> |
static class |
MetadataAPIHelper.GetCatalogs_Metadata |
static class |
MetadataAPIHelper.GetColumns_Metadata |
static class |
MetadataAPIHelper.GetSchemas_Metadata |
static class |
MetadataAPIHelper.GetTables_Metadata |
| Constructor and Description |
|---|
MetadataAPIHelper(RedshiftConnectionImpl connection) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkNameIsExactName(String name) |
protected boolean |
checkNameIsNotPattern(String name) |
protected ResultSet |
createEmptyRs(Field[] col,
int size) |
protected PreparedStatement |
createMetaDataPreparedStatement(String sql) |
protected Statement |
createMetaDataStatement() |
protected ResultSet |
createNullRs(Field[] col,
int size) |
protected ResultSet |
createRs(Field[] col,
List<Tuple> data) |
protected byte[] |
encodeStr(String str) |
protected String |
getAutoIncrement(String colDef) |
protected String |
getColumnSize(String rsType,
String character_maximum_length,
String numeric_precision) |
protected String |
getDecimalDigit(String rsType,
String numeric_scale,
int precision,
boolean customizePrecision) |
protected byte[][] |
getEmptyTuple(Field[] col,
int size) |
protected List<Tuple> |
getEmptyTupleList(Field[] col,
int size) |
static <T extends Enum<T> & MetadataAPIHelper.enumFunc<T>> |
getField(Supplier<T[]> enumObject) |
protected String |
getNullable(String nullable) |
protected byte[][] |
getNullTuple(int size) |
protected List<Tuple> |
getNullTupleList(int size) |
protected String |
getNumPrefixRadix(String rsType) |
protected String |
getRSType(String rsType) |
protected String |
getSQLType(String rsType) |
protected ResultSet |
runQuery(String sql) |
protected final RedshiftConnectionImpl connection
protected final Field[] GET_CATALOGS_COLS
protected final Field[] GET_SCHEMAS_COLS
protected final Field[] GET_TABLES_COLS
protected final Field[] GET_COLUMNS_COLS
public static final String SHOW_DATABASES_DATABASE_NAME
public static final String SHOW_SCHEMAS_DATABASE_NAME
public static final String SHOW_SCHEMAS_SCHEMA_NAME
public static final String SHOW_TABLES_DATABASE_NAME
public static final String SHOW_TABLES_SCHEMA_NAME
public static final String SHOW_TABLES_TABLE_NAME
public static final String SHOW_TABLES_TABLE_TYPE
public static final String SHOW_TABLES_REMARKS
public static final String SHOW_COLUMNS_DATABASE_NAME
public static final String SHOW_COLUMNS_SCHEMA_NAME
public static final String SHOW_COLUMNS_TABLE_NAME
public static final String SHOW_COLUMNS_COLUMN_NAME
public static final String SHOW_COLUMNS_ORDINAL_POSITION
public static final String SHOW_COLUMNS_COLUMN_DEFAULT
public static final String SHOW_COLUMNS_IS_NULLABLE
public static final String SHOW_COLUMNS_DATA_TYPE
public static final String SHOW_COLUMNS_CHARACTER_MAXIMUM_LENGTH
public static final String SHOW_COLUMNS_NUMERIC_PRECISION
public static final String SHOW_COLUMNS_NUMERIC_SCALE
public static final String SHOW_COLUMNS_REMARKS
protected final String SQL_SHOWDATABASES
protected final String SQL_SHOWDATABASESLIKE
protected final String SQL_SHOWSCHEMAS
protected final String SQL_SHOWSCHEMASLIKE
protected final String SQL_SHOWTABLES
protected final String SQL_SHOWTABLESLIKE
protected final String SQL_SHOWCOLUMNS
protected final String SQL_SHOWCOLUMNSLIKE
protected final String SQL_PREP_SHOWDATABASES
protected final String SQL_PREP_SHOWDATABASESLIKE
protected final String SQL_PREP_SHOWSCHEMAS
protected final String SQL_PREP_SHOWSCHEMASLIKE
protected final String SQL_PREP_SHOWTABLES
protected final String SQL_PREP_SHOWCOLUMNS
public MetadataAPIHelper(RedshiftConnectionImpl connection)
public static <T extends Enum<T> & MetadataAPIHelper.enumFunc<T>> Field[] getField(Supplier<T[]> enumObject)
protected Statement createMetaDataStatement() throws SQLException
SQLExceptionprotected PreparedStatement createMetaDataPreparedStatement(String sql) throws SQLException
SQLExceptionprotected ResultSet createEmptyRs(Field[] col, int size) throws SQLException
SQLExceptionprotected ResultSet createNullRs(Field[] col, int size) throws SQLException
SQLExceptionprotected ResultSet createRs(Field[] col, List<Tuple> data) throws SQLException
SQLExceptionprotected ResultSet runQuery(String sql) throws SQLException
SQLExceptionprotected byte[][] getEmptyTuple(Field[] col, int size) throws SQLException
SQLExceptionprotected List<Tuple> getEmptyTupleList(Field[] col, int size) throws SQLException
SQLExceptionprotected byte[][] getNullTuple(int size)
throws SQLException
SQLExceptionprotected List<Tuple> getNullTupleList(int size) throws SQLException
SQLExceptionprotected byte[] encodeStr(String str) throws SQLException
SQLExceptionprotected String getRSType(String rsType) throws SQLException
SQLExceptionprotected String getSQLType(String rsType) throws SQLException
SQLExceptionprotected String getColumnSize(String rsType, String character_maximum_length, String numeric_precision)
protected String getDecimalDigit(String rsType, String numeric_scale, int precision, boolean customizePrecision)
protected boolean checkNameIsNotPattern(String name)
protected boolean checkNameIsExactName(String name)
Copyright © 2024 Amazon.com Inc.. All rights reserved.