public interface Cursor
The Cursor interface is used to iterate over the results returned from a database query.
IMPORTANT: Notice that some methods might not be supported on all platforms!
There is more thorough coverage of the Database API here.
The sample code below presents a Database Explorer tool that allows executing arbitrary SQL and viewing the tabular results:

| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the cursor and release its resources
|
boolean |
first()
Move the cursor to the first row.
|
int |
getColumnCount()
Returns the column count
|
int |
getColumnIndex(String columnName)
Returns the zero-based index for a given column name.
|
String |
getColumnName(int columnIndex)
Returns the column name at a given zero-based column index.
|
int |
getPosition()
Returns the current Cursor position.
|
Row |
getRow()
Get the Row data Object.
|
boolean |
last()
Move the cursor to the last row.
|
boolean |
next()
Moves the cursor to the next row.
|
boolean |
position(int row)
Move the cursor to an absolute row position
|
boolean |
prev()
Moves the cursor to the previous row.
|
boolean first()
throws IOException
IOExceptionboolean last()
throws IOException
IOExceptionboolean next()
throws IOException
IOExceptionboolean prev()
throws IOException
IOExceptionint getColumnIndex(String columnName) throws IOException
columnName - the name of the column.IOExceptionString getColumnName(int columnIndex) throws IOException
columnIndex - the index of the columnIOExceptionint getColumnCount()
throws IOException
IOExceptionint getPosition()
throws IOException
IOExceptionboolean position(int row)
throws IOException
row - position to move toIOExceptionvoid close()
throws IOException
IOExceptionRow getRow() throws IOException
IOException