| com.quadcap.sql.Cursor
All known Subclasses: com.quadcap.sql.CursorImpl,
Cursor | public interface Cursor extends Tuple(Code) | | The base cursor interface.
author: Stan Bailes |
Method Summary | |
public boolean | absolute(int row) Move to the specified absolute row. | public void | afterLast() Position the cursor after the last row. | public void | beforeFirst() | public void | close() Close the cursor and free up any resources (including closing
the cursor's transaction if that is feasible) used by the cursor. | public void | deleteRow() | public Cursor | getOuterCursor() | public Row | getRow() | public long | getRowId() Some cursors have rows where the rows can be identified by row
id, and sometimes the cursors even know the row id for the
current row. | public Session | getSession() | public Table | getTable() Some cursors are, or can be viewed as, tables. | public void | insertRow(Row row) | public boolean | isWritable(int column) Return true if the specified column is writable. | public boolean | next() | public boolean | prev() Move the cursor back one row and return true if we moved back
to a valid row. | public void | reset(Expression where, Cursor outer) An attempt at an API to allow cursor reuse. | public void | setOuterCursor(Cursor outer) | public long | size() If the underlying implementation knows, or can compute cheaply,
the actual size of the ResultSet, it should return a non-negative
number here. | public void | updateRow(Row row) |
absolute | public boolean absolute(int row) throws SQLException(Code) | | Move to the specified absolute row. The first row is '1'.
absolute(-1) moves to the last row. absolute(0) throws an
exception.
Parameters: row - if > 0 the (one-based) row number else negativeoffset from last row in cursor. true if the specified row can be successfullypositioned. |
afterLast | public void afterLast() throws SQLException(Code) | | Position the cursor after the last row.
|
beforeFirst | public void beforeFirst() throws SQLException(Code) | | Position the cursor before the first row
|
close | public void close() throws SQLException(Code) | | Close the cursor and free up any resources (including closing
the cursor's transaction if that is feasible) used by the cursor.
exception: SQLException - may be thrown |
getOuterCursor | public Cursor getOuterCursor()(Code) | | Return the cursor in the enclosing context (this applies if we're
in a sub-query, for example)
|
getRowId | public long getRowId()(Code) | | Some cursors have rows where the rows can be identified by row
id, and sometimes the cursors even know the row id for the
current row. If you know, tell us here! If you don't know,
just return 0.
|
getSession | public Session getSession()(Code) | | Return the cursor's session
|
getTable | public Table getTable()(Code) | | Some cursors are, or can be viewed as, tables. If your cursor
is such a type, return your table here, otherwise simply return
null.
|
insertRow | public void insertRow(Row row) throws SQLException(Code) | | Insert the specified row into the cursor's underlying table
|
isWritable | public boolean isWritable(int column) throws SQLException(Code) | | Return true if the specified column is writable.
Parameters: column - the (one-based) column number exception: SQLException - may be thrown |
next | public boolean next() throws SQLException(Code) | | Advance the cursor and return true if we advanced to a valid row
|
prev | public boolean prev() throws SQLException(Code) | | Move the cursor back one row and return true if we moved back
to a valid row.
|
setOuterCursor | public void setOuterCursor(Cursor outer)(Code) | | Set the cursor context in which this subquery is executing
Parameters: outer - the cursor from the outer context |
size | public long size() throws SQLException(Code) | | If the underlying implementation knows, or can compute cheaply,
the actual size of the ResultSet, it should return a non-negative
number here. If the size is unknown and it would be expensive to
compute it (i.e., on the order of while next()) size++ ),
then the implementation should return -1
|
updateRow | public void updateRow(Row row) throws SQLException(Code) | | Replace the current cursor row with the specified row
|
|
|