|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.execute.NoRowsResultSetImpl
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.
Field Summary | |
protected Activation |
activation
|
protected long |
beginExecutionTime
|
protected long |
beginTime
|
private boolean |
dumpedStats
|
protected long |
endExecutionTime
|
protected long |
endTime
|
protected java.lang.String |
indent
|
private boolean |
isClosed
|
private boolean |
isTopResultSet
|
protected LanguageConnectionContext |
lcc
|
protected int |
sourceDepth
|
private boolean |
statisticsTimingOn
|
protected java.lang.String |
subIndent
|
protected NoPutResultSet[] |
subqueryTrackingArray
|
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
Constructor Summary | |
(package private) |
NoRowsResultSetImpl(Activation activation)
|
Method Summary | |
boolean |
checkRowPosition(int isType)
Determine if the cursor is before the first row in the result set. |
void |
close()
No rows to return, does nothing |
boolean |
doesCommit()
Does this ResultSet cause a commit or rollback. |
static void |
evaluateACheckConstraint(GeneratedMethod checkGM,
java.lang.String checkName,
long heapConglom,
Activation activation)
Run a check constraint against the current row. |
static void |
evaluateCheckConstraints(GeneratedMethod checkGM,
Activation activation)
Run check constraints against the current row. |
void |
finish()
doesn't need to do anything, as no calls are made that need to be restricted once the result set is 'finished'. |
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. |
protected long |
getCurrentTimeMillis()
Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. |
java.lang.String |
getCursorName()
Return the cursor name, null in this case. |
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()
No rows to return, so throw an exception. |
ExecRow |
getPreviousRow()
Returns the previous row from the query, and returns NULL when there are no more previous rows. |
java.lang.String |
getQueryPlanText(int depth)
RESOLVE - This method will go away once it is overloaded in all subclasses. |
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 null. |
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()
Just report that it is always closed. |
int |
modifiedRowCount()
Returns zero. |
boolean |
returnsRows()
Returns FALSE |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet |
cleanUp, open |
Field Detail |
protected final Activation activation
private boolean isTopResultSet
private boolean dumpedStats
protected NoPutResultSet[] subqueryTrackingArray
private final boolean statisticsTimingOn
private boolean isClosed
protected java.lang.String indent
protected java.lang.String subIndent
protected int sourceDepth
protected final LanguageConnectionContext lcc
protected long beginTime
protected long endTime
protected long beginExecutionTime
protected long endExecutionTime
Constructor Detail |
NoRowsResultSetImpl(Activation activation) throws StandardException
Method Detail |
public final boolean returnsRows()
returnsRows
in interface ResultSet
public int modifiedRowCount()
modifiedRowCount
in interface ResultSet
public ResultDescription getResultDescription()
getResultDescription
in interface ResultSet
public ExecRow getAbsoluteRow(int row) throws StandardException
getAbsoluteRow
in interface ResultSet
row
- The position.
StandardException
- Thrown on failureRow
public ExecRow getRelativeRow(int row) throws StandardException
getRelativeRow
in interface ResultSet
row
- The position.
StandardException
- Thrown on failureRow
public ExecRow setBeforeFirstRow() throws StandardException
setBeforeFirstRow
in interface ResultSet
StandardException
- Thrown on failureRow
public ExecRow getFirstRow() throws StandardException
getFirstRow
in interface ResultSet
StandardException
- Thrown on failureRow
public ExecRow getNextRow() throws StandardException
getNextRow
in interface ResultSet
StandardException
- Always throws a
StandardException to indicate
that this method is not intended to
be used.Row
public ExecRow getPreviousRow() throws StandardException
getPreviousRow
in interface ResultSet
StandardException
- Thrown on failureRow
public ExecRow getLastRow() throws StandardException
getLastRow
in interface ResultSet
StandardException
- Thrown on failureRow
public ExecRow setAfterLastRow() throws StandardException
setAfterLastRow
in interface ResultSet
StandardException
- Thrown on failureRow
public boolean checkRowPosition(int isType)
checkRowPosition
in interface ResultSet
public int getRowNumber()
getRowNumber
in interface ResultSet
public void close() throws StandardException
close
in interface ResultSet
StandardException
- thrown on errorpublic boolean isClosed()
isClosed
in interface ResultSet
public void finish() throws StandardException
finish
in interface ResultSet
StandardException
- on errorpublic long getExecuteTime()
getExecuteTime
in interface ResultSet
public java.sql.Timestamp getBeginExecutionTimestamp()
getBeginExecutionTimestamp
in interface ResultSet
public java.sql.Timestamp getEndExecutionTimestamp()
getEndExecutionTimestamp
in interface ResultSet
public java.lang.String getQueryPlanText(int depth)
depth
- Indentation level.
public long getTimeSpent(int type)
getTimeSpent
in interface ResultSet
type
- CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
public final NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)
ResultSet
getSubqueryTrackingArray
in interface ResultSet
numSubqueries
- The size of the array (For allocation on demand.)
ResultSet.getSubqueryTrackingArray(int)
public ResultSet getAutoGeneratedKeysResultset()
ResultSet
getAutoGeneratedKeysResultset
in interface ResultSet
ResultSet.getAutoGeneratedKeysResultset()
public java.lang.String getCursorName()
getCursorName
in interface ResultSet
ResultSet.getCursorName()
protected final long getCurrentTimeMillis()
public static void evaluateACheckConstraint(GeneratedMethod checkGM, java.lang.String checkName, long heapConglom, Activation activation) throws StandardException
checkGM
- Generated code to run the check constraint.checkName
- Name of the constraint to check.heapConglom
- Number of heap conglomerate.
StandardException
- thrown on errorpublic static void evaluateCheckConstraints(GeneratedMethod checkGM, Activation activation) throws StandardException
checkGM
- Generated code to run the check constraint.
StandardException
- thrown on errorpublic boolean doesCommit()
public java.sql.SQLWarning getWarnings()
ResultSet
getWarnings
in interface ResultSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |