Top Constructors Methods
org.apache.derby.impl.drda

pack-priv Class SQLTypes

extends Object
Class Inheritance
Imports
java.sql.SQLException, .Types, org.apache.derby.shared.common.reference.DRDAConstants

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected static int

Returns:

The Non-Nullable DB2 SQL Type.
getNonNullableSqlType
(int
DB2 SQL Type
sqlType
)

Translate DB2 SQL Type to the non-nullable type.

protected static int

Returns:

Corresponding JDBC Type
mapDB2SqlTypeToJdbcType
(int
SQL Type to convert
sqlType
,
long
storage length of type
length
,
int
ccsid of type
ccsid
)

Map DB2 SQL Type to JDBC Type

protected static int

Returns:

Corresponding DB2 SQL Type (See DRDA Manual FD:OCA Meta Data Summary, page 245)
mapJdbcTypeToDB2SqlType
(int
JDBC Type from java.sql.Types
jdbctype
,
boolean
true if this is a nullable type
nullable
,
AppRequester
- state variable for the connection
appRequester
,
int[]
output parameter with type length
outlen
)

Map JDBC Type to DB2 SqlType

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SQLTypesback to summary
private SQLTypes()

Method Detail

getNonNullableSqlTypeback to summary
protected static int getNonNullableSqlType(int sqlType)

Translate DB2 SQL Type to the non-nullable type.

Parameters
sqlType:int

DB2 SQL Type

Returns:int

The Non-Nullable DB2 SQL Type.

mapDB2SqlTypeToJdbcTypeback to summary
protected static int mapDB2SqlTypeToJdbcType(int sqlType, long length, int ccsid)

Map DB2 SQL Type to JDBC Type

Parameters
sqlType:int

SQL Type to convert

length:long

storage length of type

ccsid:int

ccsid of type

Returns:int

Corresponding JDBC Type

mapJdbcTypeToDB2SqlTypeback to summary
protected static int mapJdbcTypeToDB2SqlType(int jdbctype, boolean nullable, AppRequester appRequester, int[] outlen) throws SQLException

Map JDBC Type to DB2 SqlType

Parameters
jdbctype:int

JDBC Type from java.sql.Types

nullable:boolean

true if this is a nullable type

appRequester:AppRequester

- state variable for the connection

outlen:int[]

output parameter with type length

Returns:int

Corresponding DB2 SQL Type (See DRDA Manual FD:OCA Meta Data Summary, page 245)

Exceptions
SQLException:
thrown for unrecognized SQLType