All Packages    This Package  Previous  Next  

Interface sqlj.runtime.PositionedIterator

public interface PositionedIterator
extends ResultSetIterator
An interface implemented by all iterators that employ a by-position binding strategy. All such iterators depend on the position of the columns of the data to which they are bound, as opposed to the names of the columns to which they are bound.

In addition to implementing this interface, position-bound iterator implementations will provide:


Method Index

 o endFetch()
Returns true iff the iterator is not positioned on a row.

Methods

 o endFetch
 public abstract boolean endFetch() throws SQLException
Returns true iff the iterator is not positioned on a row. This method is used to determine the success of a FETCH..INTO statement; it returns true if the last attempt to fetch a row failed, false if the last attempt was successful. Rows are attempted to be fetched when the next method is called (which is called implicitely during the execution of a FETCH..INTO statement). Note: If next has not yet been called, this method returns true;

A common usage of this method is as follows:

while (true) {
 #sql { FETCH :c INTO ... };
 if (c.endFetch()) break;
 ...
}

Throws: SQLException
if a databse access error occurs
See Also:
next

All Packages    This Package  Previous  Next