org.apache.derby.impl.sql.execute
Class RowResultSet
java.lang.Object
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.RowResultSet
- All Implemented Interfaces:
- CursorResultSet, NoPutResultSet, ResultSet, RowLocationRetRowSource, RowSource
class RowResultSet
- extends NoPutResultSetImpl
- implements CursorResultSet
Takes a constant row value and returns it as
a result set.
This class actually probably never underlies a select statement,
but in case it might and because it has the same behavior as the
ones that do, we have it implement CursorResultSet and give
reasonable answers.
Fields inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl |
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray |
Constructor Summary |
RowResultSet(Activation activation,
ExecRow constantRow,
boolean canCacheRow,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
|
RowResultSet(Activation activation,
GeneratedMethod row,
boolean canCacheRow,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
|
Method Summary |
void |
close()
Close needs to invalidate any dependent statements, if this is a cursor. |
ExecRow |
getCurrentRow()
This is not used in positioned update and delete,
so just return a null. |
ExecRow |
getNextRowCore()
If open and not returned yet, returns the row
after plugging the parameters into the expressions. |
RowLocation |
getRowLocation()
This is not operating against a stored table,
so it has no row location to report. |
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
void |
openCore()
Sets state to 'open'. |
Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsToClone, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, updateRow |
Methods inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl |
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, cleanUp, dumpTimeStats, finish, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, reopenCore, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow |
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 |
checkRowPosition, cleanUp, clearCurrentRow, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow |
rowsReturned
public int rowsReturned
canCacheRow
private boolean canCacheRow
next
private boolean next
row
private GeneratedMethod row
cachedRow
private ExecRow cachedRow
RowResultSet
RowResultSet(Activation activation,
GeneratedMethod row,
boolean canCacheRow,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
RowResultSet
RowResultSet(Activation activation,
ExecRow constantRow,
boolean canCacheRow,
int resultSetNumber,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
openCore
public void openCore()
throws StandardException
- Sets state to 'open'.
- Specified by:
openCore
in interface NoPutResultSet
- Throws:
StandardException
- thrown if activation closed.
getNextRowCore
public ExecRow getNextRowCore()
throws StandardException
- If open and not returned yet, returns the row
after plugging the parameters into the expressions.
- Specified by:
getNextRowCore
in interface NoPutResultSet
- Specified by:
getNextRowCore
in class BasicNoPutResultSetImpl
- Returns:
- the next row in the result
- Throws:
StandardException
- thrown on failure.- See Also:
NoPutResultSet.getNextRowCore()
close
public void close()
throws StandardException
- Description copied from class:
NoPutResultSetImpl
- Close needs to invalidate any dependent statements, if this is a cursor.
Must be called by any subclasses that override close().
- Specified by:
close
in interface ResultSet
- Overrides:
close
in class NoPutResultSetImpl
- Throws:
StandardException
- thrown on error- See Also:
ResultSet.close()
getTimeSpent
public long getTimeSpent(int type)
- Return the total amount of time spent in this ResultSet
- Specified by:
getTimeSpent
in interface ResultSet
- Parameters:
type
- CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
- Returns:
- long The total amount of time spent (in milliseconds).
getRowLocation
public RowLocation getRowLocation()
- This is not operating against a stored table,
so it has no row location to report.
- Specified by:
getRowLocation
in interface CursorResultSet
- Returns:
- a null.
- See Also:
CursorResultSet
getCurrentRow
public ExecRow getCurrentRow()
- This is not used in positioned update and delete,
so just return a null.
- Specified by:
getCurrentRow
in interface CursorResultSet
- Returns:
- a null.
- See Also:
CursorResultSet
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.