18.3.4 Correspondence between HiRDB data types and SQLJ data types

Table 18-4 shows the correspondence between the HiRDB data types and the SQLJ data types. To use embedded variables in SQLJ, declare variables according to this table.

Table 18-4 Correspondence between HiRDB data types and SQLJ data types

HiRDB data typesSQLJ data types (Java data types)
When a null value is includedWhen a null value is not included
CHAR1java.lang.StringN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBCHAR4N/A
VARCHARjava.lang.StringN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBVARCHAR4N/A
NCHAR1java.lang.StringN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBNCHAR4N/A
NVARCHAR1java.lang.StringN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBNVARCHAR4N/A
MCHAR1java.lang.StringN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBMCHAR4N/A
MVARCHAR1java.lang.StringN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBMVARCHAR4N/A
DECIMAL2java.math.BigDecimalN/A
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBDECIMAL4N/A
SMALLINTjava.lang.Shortshort
INTEGERjava.lang.Integerint
REAL, SMALLFLTjava.lang.Floatfloat
FLOAT, DOUBLE PRECISIONjava.lang.Doubledouble
DATEjava.sql.DateN/A
TIMEjava.sql.TimeN/A
TIMESTAMPjava.sql.TimestampN/A
INTERVAL HOUR TO SECONDN/AN/A
INTERVAL YEAR TO DAYN/AN/A
BLOB3JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBBLOB4byte[]
BINARYJP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBBINARY4byte[]
Legend:
N/A: Cannot be used or not applicable
Note
Repetition columns cannot be used.
1 When java.lang.String is specified in the native interface version, the data type requested to the server is VARCHAR. When the data type is specified in an output variable, the length of the data acceptance area is assumed to be 32,000 bytes.
2 When java.math.BigDecimal is used as an output variable in the native interface version, the precision is set to 15 and the scale to 0.
3 When the data type is specified with byte[] in the native interface version, the data type requested to the server is BINARY type. If the HiRDB server is version 06-02 or earlier and the BLOB type is to be used, specify JP.co.Hitachi.soft.HiRDB.pdjpp.runtime.HiRDBBLOB, which is a HiRDB data type. An error occurs if byte[] is specified.
4 This type can be specified for the native interface version.