Sqlj.runtime.scrollable Interface - IBM DB2 Manual

Table of Contents

Advertisement

sqlj.runtime.Scrollable interface

sqlj.runtime.Scrollable provides methods to move around in the result table and
to check the position in the result table.
sqlj.runtime.Scrollable is implemented when a scrollable iterator is declared.
Methods
absolute(int)
afterLast()
beforeFirst()
first()
302
Application Programming Guide and Reference for Java
Parameters:
number-of-rows
The expected number of rows that SQLJ should fetch for the iterator that is
associated with the given execution context.
If number-of-rows is less than 0 or greater than the maximum number of rows
that can be fetched, an SQLException is thrown.
Related reference
"sqlj.runtime.NamedIterator interface" on page 298
"sqlj.runtime.PositionedIterator interface" on page 299
"sqlj.runtime.ExecutionContext class" on page 307
Format:
public abstract boolean absolute (int n) throws SQLException
Moves the iterator to a specified row.
If n>0, positions the iterator on row n of the result table. If n<0, and m is the
number of rows in the result table, positions the iterator on row m+n+1 of the
result table.
If the absolute value of n is greater than the number of rows in the result table,
positions the cursor after the last row if n is positive, or before the first row if
n is negative.
absolute(0) is the same as beforeFirst(). absolute(1) is the same as first().
absolute(-1) is the same as last().
Returns true if the iterator is on a row. Otherwise, returns false.
Format:
public abstract void afterLast() throws SQLException
Moves the iterator after the last row of the result table.
Format:
public abstract void beforeFirst() throws SQLException
Moves the iterator before the first row of the result table.
Format:
public abstract boolean first() throws SQLException
Moves the iterator to the first row of the result table.
Returns true if the iterator is on a row. Otherwise, returns false.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents