Scalable Database Server, HiRDB Version 8 UAP Development Guide
Some portions must be revised to migrate an SQLJ source from the standard interface version to the native interface version. Table 18-9 shows where revision is required to migrate to the native interface version.
Table 18-9 Migrating an SQLJ source to the native interface version
Command name | Standard interface version | Native interface version | Revision needed? |
---|---|---|---|
UAP (input) source | file-name.sqlj | file-name.sqlj | N |
UAP (output) source | JAVAsource-file-name. javaprofile-name.ser |
JAVAsource-file.java | N |
Option | Specification of output file name, others | Specification of output file name, others | N |
SQL prefix | #sql | #sql | N |
SQL terminator | ; | ; | N |
SQL declare section | Unnecessary | Unnecessary | N |
Embedded variable | :variable-name | :variable-name | N |
Declaration statement | #sql context class-name #sql iterator class-name |
#sql context class-name #sql iterator class-name1 |
N2 |
Connection context creation | A JDBC connection object can be specified in a parameter. | A JDBC connection object can be specified in a parameter. | N |
An object other than a JDBC connection object can be specified in a parameter. | There is no object that obtains the same parameter. | Y3 | |
Use of default connection context | JP.co.Hitachi.soft.HiRDB.sqj.runtime. PrdbContext |
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. PrdbContext |
Y4 |
Explicit specification of execution context | sqlj.runtime.ExecutionContext | JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. ExecutionContext |
Y5 |
Use of the CAST statement (acceptance of a JDBC result set) | Can be executed. | Cannot be executed. | Y6 |
Acceptance of dynamic result set | Can be executed. | Cannot be executed. | Y7 |
Data type | byte[] java.math.BigDecimal java.lang.String |
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. HiRDBBLOB JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. HiRDBDECIMAL JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. HiRDBCHAR and others |
Y8 |
Execution of different SELECT statements that use the same iterator object name | Can be executed. | Cannot be executed. | Y9 |
#sql iterator pos(HiRDBCHAR(10)); : pos positer = null pos positer2 = null; HiRDBCHAR out = null; : #sql positer = {SELECT * FROM T1}; #sql {FETCH :positer INTO :out} positer.close(); #sql positer2 = {SELECT * FROM T2}; #sql {FETCH :positer2 INTO :out} positer2.close();
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.