Nonstop Database, HiRDB Version 9 UAP Development Guide
Some portions must be revised to migrate an SQLJ source from the standard interface edition to the native interface edition. The following table shows where revisions are required to migrate to the native interface edition.
Table 19-9 Revisions required for an SQLJ source to be migrated from the standard interface edition to the native interface edition
| Command name | Standard interface edition | Native interface edition | 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-name#1 |
N#2 |
| 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. | Y#3 | |
| Use of default connection context | JP.co.Hitachi.soft.HiRDB.sqj.runtime. PrdbContext |
JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. PrdbContext |
Y#4 |
| Explicit specification of execution context | sqlj.runtime.ExecutionContext | JP.co.Hitachi.soft.HiRDB.pdjpp.runtime. ExecutionContext |
Y#5 |
| Use of the CAST statement (acceptance of a JDBC result set) | Can be executed. | Cannot be executed. | Y#6 |
| Acceptance of dynamic result set | Can be executed. | Cannot be executed. | Y#7 |
| 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 |
Y#8 |
| Execution of different SELECT statements that use the same iterator object name | Can be executed. | Cannot be executed. | Y#9 |
#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) 2011, Hitachi, Ltd.