Iterator methods
Both named and positional iterator objects have the following methods:
- rowCount()
Returns the number of rows retrieved by the iterator object
- close()
Closes the iterator; raises SQLException if the iterator is already closed
- isClosed()
Returns
TRUE
after the iterator’s close() method has been called; otherwise, it returnsFALSE
Positional iterators also have the endFetch() method.
The endFetch() method returns TRUE
when
no more rows are available.
Named iterators also have the next() method.
The next() method advances processing to successive
rows of the result set. It returns FALSE
after it fails
to find a row to retrieve. For an example of how to use the next() method, see Named iterators.