SQLJ iterator-conversion-clause

The iterator conversion clause converts a JDBC ResultSet to an iterator.

Syntax

Read syntax diagramSkip visual syntax diagramCASThost-expression

Description

host-expression
Identifies the JDBC ResultSet that is to be converted to an SQLJ iterator.

Usage notes

  • 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.
  • 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.
  • When an iterator that is generated through the iterator conversion clause is closed, the ResultSet from which the iterator is generated is also closed.