com.amazon.redshift.core

## Interface TypeInfo

All Known Implementing Classes:
  TypeInfoCache

    public interface TypeInfo

### Method Summary

Methods
`void` `addCoreType(String rsTypeName, Integer oid, Integer sqlType, String javaClass, Integer arrayOid)`
`void` `addDataType(String type, Class<? extends RedshiftObject> klass)`
`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 rsTypeName)` 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 rsTypeName)` 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.

### Method Detail

#### addCoreType

    void addCoreType(String rsTypeName,
                   Integer oid,
                   Integer sqlType,
                   String javaClass,
                   Integer arrayOid)

#### addDataType

    void addDataType(String type,
                   Class<? extends RedshiftObject> klass)
                     throws SQLException

Throws:
  `SQLException`

#### getSQLType

    int getSQLType(int oid)
                   throws SQLException

Look up the SQL typecode for a given type oid.

Parameters:
  `oid` - the type's OID
Returns:
  the SQL type code (a constant from `Types`) for the type
Throws:
  `SQLException` - if an error occurs when retrieving sql type

#### getSQLType

    int getSQLType(String rsTypeName)
                   throws SQLException

Look up the SQL typecode for a given Redshift type name.

Parameters:
  `rsTypeName` - the server type name to look up
Returns:
  the SQL type code (a constant from `Types`) for the type
Throws:
  `SQLException` - if an error occurs when retrieving sql type

#### getRSType

    int getRSType(String rsTypeName)
                  throws SQLException

Look up the oid for a given redshift type name. This is the inverse of `getRSType(int)`.

Parameters:
  `rsTypeName` - the server type name to look up
Returns:
  the type's OID, or 0 if unknown
Throws:
  `SQLException` - if an error occurs when retrieving RS type

#### getRSType

    String getRSType(int oid)
                     throws SQLException

Look up the redshift type name for a given oid. This is the inverse of `getRSType(String)`.

Parameters:
  `oid` - the type's OID
Returns:
  the server type name for that OID or null if unknown
Throws:
  `SQLException` - if an error occurs when retrieving RS type

#### getRSArrayElement

    int getRSArrayElement(int oid)
                          throws SQLException

Look up the oid of an array's base type given the array's type oid.

Parameters:
  `oid` - the array type's OID
Returns:
  the base type's OID, or 0 if unknown
Throws:
  `SQLException` - if an error occurs when retrieving array element

#### getRSArrayType

    int getRSArrayType(String elementTypeName)
                       throws SQLException

Determine the oid of the given base Redshift type's array type.

Parameters:
  `elementTypeName` - the base type's
Returns:
  the array type's OID, or 0 if unknown
Throws:
  `SQLException` - if an error occurs when retrieving array type

#### getArrayDelimiter

    char getArrayDelimiter(int oid)
                           throws SQLException

Determine the delimiter for the elements of the given array type oid.

Parameters:
  `oid` - the array type's OID
Returns:
  the base type's array type delimiter
Throws:
  `SQLException` - if an error occurs when retrieving array delimiter

#### getRSTypeNamesWithSQLTypes

    Iterator<String> getRSTypeNamesWithSQLTypes()

#### getRSobject

    Class<? extends RedshiftObject> getRSobject(String type)

#### getJavaClass

    String getJavaClass(int oid)
                        throws SQLException

Throws:
  `SQLException`

#### getTypeForAlias

    String getTypeForAlias(String alias)

#### getPrecision

    int getPrecision(int oid,
                   int typmod)

#### getScale

    int getScale(int oid,
               int typmod)

#### isCaseSensitive

    boolean isCaseSensitive(int oid)

#### isSigned

    boolean isSigned(int oid)

#### getDisplaySize

    int getDisplaySize(int oid,
                     int typmod)

#### getMaximumPrecision

    int getMaximumPrecision(int oid)

#### requiresQuoting

    boolean requiresQuoting(int oid)
                            throws SQLException

Throws:
  `SQLException`

#### requiresQuotingSqlType

    boolean requiresQuotingSqlType(int sqlType)
                                   throws SQLException

Returns true if particular sqlType requires quoting. This method is used internally by the driver, so it might disappear without notice.

Parameters:
  `sqlType` - sql type as in java.sql.Types
Returns:
  true if the type requires quoting
Throws:
  `SQLException` - if something goes wrong