|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ResultSet interface provides a method to tell whether a statement returns rows, and if so, a method to get the rows. It also provides a method to get metadata about the contents of the rows. It also provide a method to accept rows as input.
There is no single implementation of the ResultSet interface. Instead, the various support operations involved in executing statements implement this interface.
Although ExecRow is used on the interface, it is not available to users of the API. They should use Row, the exposed super-interface of ExecRow. <>
Valid transitions:
Field Summary | |
static int |
CURRENT_RESULTSET_ONLY
|
static int |
ENTIRE_RESULTSET_TREE
|
static int |
ISAFTERLAST
|
static int |
ISBEFOREFIRST
|
static int |
ISFIRST
|
static int |
ISLAST
|
Method Summary | |
boolean |
checkRowPosition(int isType)
Determine if the result set is at one of the positions according to the constants above (ISBEFOREFIRST etc). |
void |
cleanUp()
Tells the system to clean up on an error. |
void |
close()
Tells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet. |
void |
finish()
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). |
ExecRow |
getAbsoluteRow(int row)
Returns the row at the absolute position from the query, and returns NULL when there is no such position. |
ResultSet |
getAutoGeneratedKeysResultset()
ResultSet for rowss inserted into the table (contains auto-generated keys columns only) |
java.sql.Timestamp |
getBeginExecutionTimestamp()
Get the Timestamp for the beginning of execution. |
java.lang.String |
getCursorName()
Returns the name of the cursor, if this is cursor statement of some type (declare, open, fetch, positioned update, positioned delete, close). |
java.sql.Timestamp |
getEndExecutionTimestamp()
Get the Timestamp for the end of execution. |
long |
getExecuteTime()
Get the execution time in milliseconds. |
ExecRow |
getFirstRow()
Returns the first row from the query, and returns NULL when there are no rows. |
ExecRow |
getLastRow()
Returns the last row from the query, and returns NULL when there are no rows. |
ExecRow |
getNextRow()
Returns the next row from the query, and returns NULL when there are no more rows. |
ExecRow |
getPreviousRow()
Returns the previous row from the query, and returns NULL when there are no more previous rows. |
ExecRow |
getRelativeRow(int row)
Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. |
ResultDescription |
getResultDescription()
Returns a ResultDescription object, which describes the results of the statement this ResultSet is in. |
int |
getRowNumber()
Returns the row number of the current row. |
NoPutResultSet[] |
getSubqueryTrackingArray(int numSubqueries)
Get the subquery ResultSet tracking array from the top ResultSet. |
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
java.sql.SQLWarning |
getWarnings()
Return the set of warnings generated during the execution of this result set. |
boolean |
isClosed()
Find out if the ResultSet is closed or not. |
int |
modifiedRowCount()
Returns the number of rows affected by the statement. |
void |
open()
Needs to be called before the result set will do anything. |
boolean |
returnsRows()
Returns TRUE if the statement returns rows (i.e. is a SELECT or FETCH statement), FALSE if it returns no rows. |
ExecRow |
setAfterLastRow()
Sets the current position to after the last row and returns NULL because there is no current row. |
ExecRow |
setBeforeFirstRow()
Sets the current position to before the first row and returns NULL because there is no current row. |
Field Detail |
public static final int CURRENT_RESULTSET_ONLY
public static final int ENTIRE_RESULTSET_TREE
public static final int ISBEFOREFIRST
public static final int ISFIRST
public static final int ISLAST
public static final int ISAFTERLAST
Method Detail |
public boolean returnsRows()
public int modifiedRowCount()
public ResultDescription getResultDescription()
public void open() throws StandardException
StandardException
- Thrown on failurepublic ExecRow getAbsoluteRow(int row) throws StandardException
row
- The position.
StandardException
- Thrown on failureRow
public ExecRow getRelativeRow(int row) throws StandardException
row
- The position.
StandardException
- Thrown on failureRow
public ExecRow setBeforeFirstRow() throws StandardException
StandardException
- Thrown on failureRow
public ExecRow getFirstRow() throws StandardException
StandardException
- Thrown on failureRow
public ExecRow getNextRow() throws StandardException
StandardException
- Thrown on failureRow
public ExecRow getPreviousRow() throws StandardException
StandardException
- Thrown on failureRow
public ExecRow getLastRow() throws StandardException
StandardException
- Thrown on failureRow
public ExecRow setAfterLastRow() throws StandardException
StandardException
- Thrown on failureRow
public boolean checkRowPosition(int isType) throws StandardException
StandardException
- Thrown on error.public int getRowNumber()
public void close() throws StandardException
StandardException
- Thrown on error.public void cleanUp() throws StandardException
StandardException
- Thrown on error.public boolean isClosed()
public void finish() throws StandardException
StandardException
- on errorpublic long getExecuteTime()
public java.sql.Timestamp getBeginExecutionTimestamp()
public java.sql.Timestamp getEndExecutionTimestamp()
public long getTimeSpent(int type)
type
- CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
public NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)
numSubqueries
- The size of the array (For allocation on demand.)
public ResultSet getAutoGeneratedKeysResultset()
public java.lang.String getCursorName()
public java.sql.SQLWarning getWarnings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |