Home | Previous Page | Next Page   Appendix C. Mapping Data Types > Data Type Mapping Between Informix and JDBC Data Types >

Data Type Mapping Between C Opaque Types and Java

To create an opaque type using Java, you can use the UDT and UDR Manager facility. For more information, see Working with Opaque Types.

All opaque data is stored in the database server table in a C struct, which is made up of various DataBlade API types, as defined in the opaque type. (For more information, see the IBM Informix: DataBlade API Programmer's Guide.)

The following table lists the mapping of DataBlade API types to their corresponding Java types.

DataBlade API Type
Java Type
MI_LO_HANDLE
BLOB or CLOB
gl_wchar_t
String
mi_boolean
boolean
mi_char
String
mi_char1
String
mi_date
Date
mi_datetime
TimeStamp
mi_decimal
BigDecimal
mi_double_precision
double
mi_int1
byte
mi_int8
long
mi_integer
int
mi_interval
Not supported
mi_money
BigDecimal
mi_numeric
BigDecimal
mi_real
float
mi_smallint
short
mi_string
String
mi_unsigned_char1
String
mi_unsigned_int8
long
mi_unsigned_integer
int
mi_unsigned_smallint
short
mi_wchar
String

The C struct may contain padding bytes. IBM Informix JDBC Driver automatically skips these padding bytes to make sure the next data member is properly aligned. Therefore, your Java objects do not have to take care of alignment themselves.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]