Interface ResultSet
java.sql
Interface ResultSet
All Superinterfaces: AutoCloseable, WrapperAll Known
Subinterfaces: CachedRowSet, FilteredRowSet, JdbcRowSet,
JoinRowSet, RowSet, SyncResolver, WebRowSet
public interface ResultSet
extends Wrapper, AutoCloseable
A ResultSet is a table of data representing a database result set, which is usually generated by executing a statement that queries the database. A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row.
The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.
A default ResultSet object is not updatable and has a cursor that moves forward only. Hence, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable.
Field Summary for Interface ResultSet
Access Modifier |
>Field and Description |
static int |
>CLOSE_CURSORS_AT_COMMIT
The constant indicating that open ResultSet objects with this holdability will be closed when the current transaction is commited.
|
static int |
CONCUR_READ_ONLY
The constant indicating the concurrency mode for a
ResultSet object that may NOT be updated.
|
static int |
CONCUR_UPDATABLE: The constant indicating the concurrency mode for a ResultSet object that may be updated. |
static int |
FETCH_FORWARD: The constant indicating that the rows in a result set will be processed in a forward direction; first-to-last. |
static int |
FETCH_REVERSE: The constant indicating that the rows in a result set will be processed in a reverse direction; last-to-first. |
static int |
FETCH_UNKNOWN: The constant indicating that the order in which rows in a result set will be processed is unknown. |
static int |
HOLD_CURSORS_OVER_COMMIT: The constant indicating that open ResultSet objects with this holdability will remain open when the current transaction is commited. |
static int |
TYPE_FORWARD_ONLY: The constant indicating the type for a ResultSet object whose cursor may move only forward. |
static int |
TYPE_SCROLL_INSENSITIVE: The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes to the data that underlies the ResultSet . |
static int |
TYPE_SCROLL_SENSITIVE: The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes to the data that underlies the ResultSet . |