Data type mapping between extended types and Java and JDBC types

The following table lists mappings between the extended data types supported in and the corresponding Java™ and JDBC types.
JDBC type Java object type HCL OneDB™ type
java.sql.Types.LONGVARCHAR

java.sql.String
java.io.inputStream

LVARCHAR
IfxTypes.IFX_TYPE_LVARCHAR

java.sql.Types.JAVA_OBJECT java.sql.SQLData

Opaque type
IfxTypes.IFX_TYPE_UDTFIXED
IfxTypes.IFX_TYPE_UDTVAR

java.sql.Types.LONGVARBINARY
java.sql.Types.BLOB

java.sql.Blob
java.io.inputStream
byte[]

BLOB
IfxTypes.IFX_TYPE_BLOB

java.sql.Types.LONGVARCHAR
java.sql.Types.CLOB

java.sql.Clob
java.io.inputStream
java.lang.String

CLOB
IfxTypes.IFX_TYPE_CLOB

java.sql.Types.LONGVARBINARY
java.sql.Types.BLOB

java.io.inputStream
java.sql.Blob byte[]

BYTE
IfxTypes.IFX_TYPE_BYTE

java.sql.Types.LONGVARCHAR
java.sql.Types.CLOB

java.io.InputStream
java.sql.Clob java.sql.String

TEXT
IfxTypes.IFX_TYPE_TEXT

java.sql.Types.JAVA_OBJECT
java.sql.Types.STRUCT

java.sql.SQLData
java.sql.Struct

Named row
IfxTypes.IFX_TYPE_ROW

java.sql.Types.STRUCT java.sql.Struct

Unnamed row
IfxTypes.IFX_TYPE_ROW

java.sql.Types.ARRAY
java.sql.Types.OTHER

java.sql.Array
java.util.LinkedList
java.util.HashSet
java.util.TreeSet

set, multiset
IfxTypes.IFX_TYPE_SET
IfxTypes.IFX_TYPE_MULTISET

java.sql.Types.ARRAY
java.sql.Types.OTHER

java.sql.Array
java.util.ArrayList
java.util.LinkedList

LIST
IfxTypes.IFX_TYPE_LIST

A Java boolean object can map to the HCL OneDB smallint data type or the HCL OneDB boolean data type. HCL OneDB JDBC Driver attempts to map it according to the column type. However, in cases such as PreparedStatement host variables, HCL OneDB JDBC Driver cannot access the column types, so the mapping is somewhat limited. For more details on data type mapping, see Data type mapping for PreparedStatement.setXXX() extensions.