sqlj.runtime
Interface NamedIterator

All Superinterfaces:
ResultSetIterator

public interface NamedIterator
extends ResultSetIterator

An interface implemented by all iterators that employ a by-name binding strategy. All such iterators depend on the name of the columns of the data to which they are bound, as opposed to the order of the columns to which they are bound.

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

A common usage of a NamedIterator is as follows:

#sql iterator StringIter(String the_value);

[...]

IntIter namedIter;


#sql [ctx] namedIter = { SELECT the_value FROM tab WHERE the_key = 1 };

try {
    while (namedIter.next()) {
        String val = namedIter.the_value();
        [...]
    } 
} finally {
    namedIter.close();
}

See Also:
PositionedIterator, ResultSetIterator

Fields inherited from interface sqlj.runtime.ResultSetIterator
ASENSITIVE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, INSENSITIVE, SENSITIVE
 
Methods inherited from interface sqlj.runtime.ResultSetIterator
clearWarnings, close, getFetchSize, getResultSet, getRow, getSensitivity, getWarnings, isClosed, next, setFetchSize