EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #308 background imageLoading...
Page #308 background image
 CAST host-expression 
Description
host-expression
Identifies the JDBC ResultSet that is to be converted to an SQLJ iterator.
Usage notes
v If the iterator to which the JDBC ResultSet is to be converted is a positioned
iterator, the number of columns in the ResultSet must match the number of
columns in the iterator. In addition, the data type of each column in the
ResultSet must be compatible with the data type of the corresponding column
in the iterator.
v If the iterator is a named iterator, the name of each accessor method must match,
except for case, the name of a column in the ResultSet. In addition, the data
type of the object that an accessor method returns must be compatible with the
data type of the corresponding column in the ResultSet.
v When an iterator that is generated through the iterator conversion clause is
closed, the ResultSet from which the iterator is generated is also closed.
Related reference
“SQLJ assignment-clause” on page 291
Interfaces and classes in the sqlj.runtime package
The sqlj.runtime package defines the run-time classes and interfaces that are used
directly or indirectly by the SQLJ programmer.
Classes such as AsciiStream are used directly by the SQLJ programmer. Interfaces
such as ResultSetIterator are implemented as part of generated class
declarations.
sqlj.runtime interfaces
The following table summarizes the interfaces in sqlj.runtime.
Table 81. Summary of sqlj.runtime interfaces
Interface name Purpose
ConnectionContext Manages the SQL operations that are performed during a connection to a data
source.
ForUpdate Implemented by iterators that are used in a positioned UPDATE or DELETE
statement.
NamedIterator Implemented by iterators that are declared as named iterators.
PositionedIterator Implemented by iterators that are declared as positioned iterators.
ResultSetIterator Implemented by all iterators to allow query results to be processed using a JDBC
ResultSet.
Scrollable Provides a set of methods for manipulating scrollable iterators.
sqlj.runtime classes
The following table summarizes the classes in sqlj.runtime.
292 Application Programming Guide and Reference for Java

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability