Indicates the data list of database result set. It is generated through inquiring database statement executed by NpsPreparedStatement.
Currently, large object (CLOB, BLOB, LONG) and array is not supported.
Example code:
var pstmt = session.PrepareStatement("select sysdate from dual");
var rs = pstmt.ExecuteQuery();
while(rs.Next())
{
out.Info(rs.GetDate(1));
}
| boolean |
First() throws Exception Move pointer to the first row of the ResultSet. If pointer is in valid row, it will return to “true”. If there is no row in result set, it will return to “false”. |
| boolean |
Last() throws Exception Move pointer to the last row of the ResultSet. If pointer is in valid row, it will return to “true”. If there is no row in result set, it will return to “false”. |
| boolean |
Previous() throws Exception Move pointer to the previous row of the ResultSet. If pointer is in valid row, it will return to “true”. If there is no row in result set, it will return to “false”. |
| boolean |
Next() throws Exception Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on. If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read. returns true if the new current row is valid; false if there are no more rows |
| void |
Close() Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. |
| void |
DeleteRow() throws Exception Deletes the current row from this ResultSet object and from the underlying database. This method cannot be called when the cursor is on the insert row. |
| void |
InsertRow() throws Exception Inserts the contents of the insert row into this ResultSet object and into the database. The cursor must be on the insert row when this method is called. |
| int |
GetInt(int columnIndex) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as an int. columnIndex - the first column is 1, the second is 2, ... |
| int |
GetIntByName(String columnName) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as an int. columnName - the SQL name of the column |
| String |
GetString(int columnIndex) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as a String. columnIndex - the first column is 1, the second is 2, ... |
| String |
GetStringByName(String columnName) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as a String. columnName - the SQL name of the column |
| double |
GetDouble(int columnIndex) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as a double. columnIndex - the first column is 1, the second is 2, ... |
| double |
GetDoubleByName(String columnName) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as a double. columnName - the SQL name of the column |
| Date |
GetDate(int columnIndex) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as a Date object. columnIndex - the first column is 1, the second is 2, ... |
| Date |
GetDateByName(String columnName) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object as a Date object. columnName - the SQL name of the column |
| String |
GetClob(int columnIndex) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object. columnIndex - the first column is 1, the second is 2, ... |
| String |
GetClobByName(String columnName) throws Exception Retrieves the value of the designated column in the current row of this ResultSet object. columnName - the SQL name of the column |
| boolean |
IsFirst() throws Exception Retrieves whether the cursor is on the first row of this ResultSet object. Returns true if the cursor is on the first row; false otherwise |
| boolean |
IsLast() throws Exception Retrieves whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set. Returns true if the cursor is on the last row; false otherwise |
| boolean |
IsAfterLast() throws Exception Retrieves whether the cursor is after the last row in this ResultSet object. Returns true if the cursor is after the last row; false if the cursor is at any other position or the result set contains no rows |
| boolean |
IsBeforeFirst() throws Exception Retrieves whether the cursor is before the first row in this ResultSet object. Returns true if the cursor is before the first row; false if the cursor is at any other position or the result set contains no rows |
| void |
UpdateDate(int columnIndex, Object d) throws Exception Updates the designated column with a Date value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnIndex - the first column is 1, the second is 2, ... |
| void |
UpdateDateByName(String columnName, Object d) throws Exception Updates the designated column with a Date value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnName - the SQL name of the column |
| void |
UpdateDouble(int columnIndex, double x) throws Exception Updates the designated column with a double value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnIndex - the first column is 1, the second is 2, ... |
| void |
UpdateDoubleByName(String columnName, double x) throws Exception Updates the designated column with a double value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnName - the SQL name of the column |
| void |
UpdateInt(int columnIndex, int x) throws Exception Updates the designated column with an int value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnIndex - the first column is 1, the second is 2, ... |
| void |
UpdateIntByName(String columnName, int x) throws Exception Updates the designated column with an int value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnName - the SQL name of the column |
| void |
UpdateString(int columnIndex, String x) throws Exception Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnIndex - the first column is 1, the second is 2, ... |
| void |
UpdateStringByName(String columnName, String x) throws Exception Updates the designated column with a String value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnName - the SQL name of the column |
| void |
UpdateNull(int columnIndex) throws Exception Gives a nullable column a null value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnIndex - the first column is 1, the second is 2, ... |
| void |
UpdateNullByName(String columnName) throws Exception Gives a nullable column a null value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. columnName - the SQL name of the column |
| void |
UpdateRow() throws Exception Updates the underlying database with the new contents of the current row of this ResultSet object. This method cannot be called when the cursor is on the insert row. |
| boolean |
RowDeleted() throws Exception Retrieves whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not this ResultSet object can detect deletions. Returns true if a row was deleted and deletions are detected; false otherwise |
| boolean |
RowInserted() throws Exception Retrieves whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object can detect visible inserts. Returns true if a row has had an insertion and insertions are detected; false otherwise |
| boolean |
RowUpdated() throws Exception Retrieves whether the current row has been updated. The value returned depends on whether or not the result set can detect updates. Returns true if both (1) the row has been visibly updated by the owner or another and (2) updates are detected |
| void |
SetFetchDirection(int direction) throws Exception Gives a hint as to the direction in which the rows in this ResultSet object will be processed. The initial value is determined by the Statement object that produced this ResultSet object. The fetch direction may be changed at any time. 1000 indicating that the rows in a result set will be processed in a forward direction; first-to-last. 1001indicating that the rows in a result set will be processed in a reverse direction; last-to-first. |
| void |
RefreshRow() throws Exception Refreshes the current row with its most recent value in the database. This method cannot be called when the cursor is on the insert row. |