| java.lang.Object org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
All known Subclasses: org.apache.derby.impl.sql.execute.MiscResultSet, org.apache.derby.impl.sql.execute.DMLWriteResultSet, org.apache.derby.impl.sql.execute.CallStatementResultSet,
NoRowsResultSetImpl | abstract class NoRowsResultSetImpl implements ResultSet(Code) | | This implementation of ResultSet
is meant to be overridden by subtypes
in the execution engine. Its primary users
will be DDL, which only need to define a
constructor to create the DDL object being
defined. All other ResultSet operations will
be handled by this superclass -- i.e., nothing
is allowed to be done to a DDL Result Set, since
it has no rows to provide.
This abstract class does not define the entire ResultSet
interface, but leaves the 'get' half of the interface
for subtypes to implement. It is package-visible only,
with its methods being public for exposure by its subtypes.
author: ames |
Method Summary | |
public boolean | checkRowPosition(int isType) Determine if the cursor is before the first row in the result
set. | final public void | clearCurrentRow() Clear the current row. | public void | close() | public boolean | doesCommit() Does this ResultSet cause a commit or rollback. | public static void | evaluateACheckConstraint(GeneratedMethod checkGM, String checkName, long heapConglom, Activation activation) Run a check constraint against the current row. | public static void | evaluateCheckConstraints(GeneratedMethod checkGM, Activation activation) Run check constraints against the current row. | public void | finish() doesn't need to do anything, as no calls
are made that need to be restricted once
the result set is 'finished'. | public ExecRow | getAbsoluteRow(int row) Returns the row at the absolute position from the query,
and returns NULL when there is no such position. | final public Activation | getActivation() | public ResultSet | getAutoGeneratedKeysResultset() | public Timestamp | getBeginExecutionTimestamp() Get the Timestamp for the beginning of execution. | final protected long | getCurrentTimeMillis() Return the current time in milliseconds, if DEBUG and RunTimeStats is
on, else return 0. | public String | getCursorName() Return the cursor name, null in this case. | public Timestamp | getEndExecutionTimestamp() Get the Timestamp for the end of execution. | public long | getExecuteTime() Get the execution time in milliseconds. | public ExecRow | getFirstRow() Returns the first row from the query, and returns NULL when there
are no rows. | public ExecRow | getLastRow() Returns the last row from the query, and returns NULL when there
are no rows. | public ExecRow | getNextRow() No rows to return, so throw an exception. | public ExecRow | getPreviousRow() Returns the previous row from the query, and returns NULL when there
are no more previous rows. | public String | getQueryPlanText(int depth) RESOLVE - This method will go away once it is overloaded in all subclasses.
Return the query plan as a String.
Parameters: depth - Indentation level. | public 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. | public ResultDescription | getResultDescription() Returns null. | public int | getRowNumber() Returns the row number of the current row. | final public NoPutResultSet[] | getSubqueryTrackingArray(int numSubqueries) | public long | getTimeSpent(int type) Return the total amount of time spent in this ResultSet
Parameters: type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSetENTIRE_RESULTSET_TREE - time spent in this ResultSet and below. | public java.sql.SQLWarning | getWarnings() | public boolean | isClosed() Just report that it is always closed.
RESOLVE: if we don't report that we are closed,
then we will wind up with a dependency problem when
we send an invalidateFor on our own Statement. | public int | modifiedRowCount() Returns zero. | final public boolean | returnsRows() | public ExecRow | setAfterLastRow() Sets the current position to after the last row and returns NULL
because there is no current row. | public ExecRow | setBeforeFirstRow() Sets the current position to before the first row and returns NULL
because there is no current row. |
beginExecutionTime | protected long beginExecutionTime(Code) | | |
beginTime | protected long beginTime(Code) | | |
endExecutionTime | protected long endExecutionTime(Code) | | |
endTime | protected long endTime(Code) | | |
sourceDepth | protected int sourceDepth(Code) | | |
checkRowPosition | public boolean checkRowPosition(int isType)(Code) | | Determine if the cursor is before the first row in the result
set.
true if before the first row, false otherwise. Returnsfalse when the result set contains no rows. |
clearCurrentRow | final public void clearCurrentRow()(Code) | | Clear the current row. This is done after a commit on holdable
result sets.
This is a no-op on result set which do not provide rows.
|
doesCommit | public boolean doesCommit()(Code) | | Does this ResultSet cause a commit or rollback.
Whether or not this ResultSet cause a commit or rollback. |
evaluateACheckConstraint | public static void evaluateACheckConstraint(GeneratedMethod checkGM, String checkName, long heapConglom, Activation activation) throws StandardException(Code) | | Run a check constraint against the current row. Raise an error if
the check constraint is violated.
Parameters: checkGM - Generated code to run the check constraint. Parameters: checkName - Name of the constraint to check. Parameters: heapConglom - Number of heap conglomerate. Parameters: activation - Class in which checkGM lives. exception: StandardException - thrown on error |
evaluateCheckConstraints | public static void evaluateCheckConstraints(GeneratedMethod checkGM, Activation activation) throws StandardException(Code) | | Run check constraints against the current row. Raise an error if
a check constraint is violated.
Parameters: checkGM - Generated code to run the check constraint. Parameters: activation - Class in which checkGM lives. exception: StandardException - thrown on error |
finish | public void finish() throws StandardException(Code) | | doesn't need to do anything, as no calls
are made that need to be restricted once
the result set is 'finished'.
exception: StandardException - on error |
getAbsoluteRow | public ExecRow getAbsoluteRow(int row) throws StandardException(Code) | | Returns the row at the absolute position from the query,
and returns NULL when there is no such position.
(Negative position means from the end of the result set.)
Moving the cursor to an invalid position leaves the cursor
positioned either before the first row (negative position)
or after the last row (positive position).
NOTE: An exception will be thrown on 0.
Parameters: row - The position. The row at the absolute position, or NULL if no such position. exception: StandardException - Thrown on failure See Also: Row |
getBeginExecutionTimestamp | public Timestamp getBeginExecutionTimestamp()(Code) | | Get the Timestamp for the beginning of execution.
Timestamp The Timestamp for the beginning of execution. |
getCurrentTimeMillis | final protected long getCurrentTimeMillis()(Code) | | Return the current time in milliseconds, if DEBUG and RunTimeStats is
on, else return 0. (Only pay price of system call if need to.)
long Current time in milliseconds. |
getEndExecutionTimestamp | public Timestamp getEndExecutionTimestamp()(Code) | | Get the Timestamp for the end of execution.
Timestamp The Timestamp for the end of execution. |
getExecuteTime | public long getExecuteTime()(Code) | | Get the execution time in milliseconds.
long The execution time in milliseconds. |
getPreviousRow | public ExecRow getPreviousRow() throws StandardException(Code) | | Returns the previous row from the query, and returns NULL when there
are no more previous rows.
The previous row, or NULL if no more previous rows. exception: StandardException - Thrown on failure See Also: Row |
getQueryPlanText | public String getQueryPlanText(int depth)(Code) | | RESOLVE - This method will go away once it is overloaded in all subclasses.
Return the query plan as a String.
Parameters: depth - Indentation level. String The query plan as a String. |
getRelativeRow | public ExecRow getRelativeRow(int row) throws StandardException(Code) | | Returns the row at the relative position from the current
cursor position, and returns NULL when there is no such position.
(Negative position means toward the beginning of the result set.)
Moving the cursor to an invalid position leaves the cursor
positioned either before the first row (negative position)
or after the last row (positive position).
NOTE: 0 is valid.
NOTE: An exception is thrown if the cursor is not currently
positioned on a row.
Parameters: row - The position. The row at the relative position, or NULL if no such position. exception: StandardException - Thrown on failure See Also: Row |
getRowNumber | public int getRowNumber()(Code) | | Returns the row number of the current row. Row
numbers start from 1 and go to 'n'. Corresponds
to row numbering used to position current row
in the result set (as per JDBC).
the row number, or 0 if not on a row |
getTimeSpent | public long getTimeSpent(int type)(Code) | | Return the total amount of time spent in this ResultSet
Parameters: type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSetENTIRE_RESULTSET_TREE - time spent in this ResultSet and below. long The total amount of time spent (in milliseconds). |
isClosed | public boolean isClosed()(Code) | | Just report that it is always closed.
RESOLVE: if we don't report that we are closed,
then we will wind up with a dependency problem when
we send an invalidateFor on our own Statement. It
will call lcc.verifyNoOpenResultSets(), which is really
supposed to be verify that there are no read only
result sets that are open.
|
modifiedRowCount | public int modifiedRowCount()(Code) | | Returns zero.
|
returnsRows | final public boolean returnsRows()(Code) | | Returns FALSE
|
|
|