| Modifier and Type | Field and Description |
|---|---|
static String |
GEOGRAPHY_NAME |
static int |
GEOGRAPHYOID |
static String |
GEOMETRY_NAME |
static int |
GEOMETRYHEXOID |
static int |
GEOMETRYOID |
static String |
SUPER_NAME |
static int |
SUPEROID |
static String |
TID_ARRAY_NAME |
static String |
TID_NAME |
static String |
VARBYTE_NAME |
static int |
VARBYTEOID |
static String |
XID_ARRAY_NAME |
static String |
XID_NAME |
| Constructor and Description |
|---|
TypeInfoCache(BaseConnection conn,
int unknownLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCoreType(String rsTypeName,
Integer oid,
Integer sqlType,
String javaClass,
Integer arrayOid) |
void |
addDataType(String type,
Class<? extends RedshiftObject> klass) |
void |
cacheSQLTypes(RedshiftLogger logger) |
protected int |
convertArrayToBaseOid(int oid)
Return the oid of the array's base element if it's an array, if not return the provided oid.
|
char |
getArrayDelimiter(int oid)
Determine the delimiter for the elements of the given array type oid.
|
int |
getDisplaySize(int oid,
int typmod) |
String |
getJavaClass(int oid) |
int |
getMaximumPrecision(int oid) |
int |
getPrecision(int oid,
int typmod) |
int |
getRSArrayElement(int oid)
Look up the oid of an array's base type given the array's type oid.
|
int |
getRSArrayType(String elementTypeName)
Determine the oid of the given base Redshift type's array type.
|
Class<? extends RedshiftObject> |
getRSobject(String type) |
String |
getRSType(int oid)
Look up the redshift type name for a given oid.
|
int |
getRSType(String pgTypeName)
Look up the oid for a given redshift type name.
|
Iterator<String> |
getRSTypeNamesWithSQLTypes() |
int |
getScale(int oid,
int typmod) |
int |
getSQLType(int oid)
Look up the SQL typecode for a given type oid.
|
int |
getSQLType(String pgTypeName)
Look up the SQL typecode for a given Redshift type name.
|
String |
getTypeForAlias(String alias) |
boolean |
isCaseSensitive(int oid) |
boolean |
isSigned(int oid) |
boolean |
requiresQuoting(int oid) |
boolean |
requiresQuotingSqlType(int sqlType)
Returns true if particular sqlType requires quoting.
|
public static final String GEOMETRY_NAME
public static final int GEOMETRYOID
public static final int GEOMETRYHEXOID
public static final String SUPER_NAME
public static final int SUPEROID
public static final String VARBYTE_NAME
public static final int VARBYTEOID
public static final String GEOGRAPHY_NAME
public static final int GEOGRAPHYOID
public static final String TID_NAME
public static final String TID_ARRAY_NAME
public static final String XID_NAME
public static final String XID_ARRAY_NAME
public TypeInfoCache(BaseConnection conn, int unknownLength)
public void addCoreType(String rsTypeName, Integer oid, Integer sqlType, String javaClass, Integer arrayOid)
addCoreType in interface TypeInfopublic void addDataType(String type, Class<? extends RedshiftObject> klass) throws SQLException
addDataType in interface TypeInfoSQLExceptionpublic Iterator<String> getRSTypeNamesWithSQLTypes()
getRSTypeNamesWithSQLTypes in interface TypeInfopublic void cacheSQLTypes(RedshiftLogger logger) throws SQLException
SQLExceptionpublic int getSQLType(int oid)
throws SQLException
TypeInfogetSQLType in interface TypeInfooid - the type's OIDTypes) for the typeSQLException - if an error occurs when retrieving sql typepublic int getSQLType(String pgTypeName) throws SQLException
TypeInfogetSQLType in interface TypeInfopgTypeName - the server type name to look upTypes) for the typeSQLException - if an error occurs when retrieving sql typepublic int getRSType(String pgTypeName) throws SQLException
TypeInfoTypeInfo.getRSType(int).getRSType in interface TypeInfopgTypeName - the server type name to look upSQLException - if an error occurs when retrieving RS typepublic String getRSType(int oid) throws SQLException
TypeInfoTypeInfo.getRSType(String).getRSType in interface TypeInfooid - the type's OIDSQLException - if an error occurs when retrieving RS typepublic int getRSArrayType(String elementTypeName) throws SQLException
TypeInfogetRSArrayType in interface TypeInfoelementTypeName - the base type'sSQLException - if an error occurs when retrieving array typeprotected int convertArrayToBaseOid(int oid)
oid - input oidpublic char getArrayDelimiter(int oid)
throws SQLException
TypeInfogetArrayDelimiter in interface TypeInfooid - the array type's OIDSQLException - if an error occurs when retrieving array delimiterpublic int getRSArrayElement(int oid)
throws SQLException
TypeInfogetRSArrayElement in interface TypeInfooid - the array type's OIDSQLException - if an error occurs when retrieving array elementpublic Class<? extends RedshiftObject> getRSobject(String type)
getRSobject in interface TypeInfopublic String getJavaClass(int oid) throws SQLException
getJavaClass in interface TypeInfoSQLExceptionpublic String getTypeForAlias(String alias)
getTypeForAlias in interface TypeInfopublic int getPrecision(int oid,
int typmod)
getPrecision in interface TypeInfopublic boolean isCaseSensitive(int oid)
isCaseSensitive in interface TypeInfopublic int getDisplaySize(int oid,
int typmod)
getDisplaySize in interface TypeInfopublic int getMaximumPrecision(int oid)
getMaximumPrecision in interface TypeInfopublic boolean requiresQuoting(int oid)
throws SQLException
requiresQuoting in interface TypeInfoSQLExceptionpublic boolean requiresQuotingSqlType(int sqlType)
throws SQLException
requiresQuotingSqlType in interface TypeInfosqlType - sql type as in java.sql.TypesSQLException - if something goes wrongCopyright © 2024 Amazon.com Inc.. All rights reserved.