|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.WindowResultSet
class WindowResultSet
WindowResultSet This ResultSet handles a window function ResultSet. The ResultSet is opened using openCore(). Each row is fetched and any restrictions evaluated for each row in a do-while loop in getNextRowCore(). The ResultSet is closed using closeCore().
| Field Summary | |
|---|---|
private ExecRow |
allocatedRow
|
private FormatableBitSet |
referencedColumns
|
private GeneratedMethod |
restriction
|
long |
restrictionTime
Cumulative time needed to evaluate any restriction on this result set. |
private long |
rownumber
|
NoPutResultSet |
source
Source result set, |
| Fields inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
|---|
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet |
| 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 |
| Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet |
|---|
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE |
| Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
|---|
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
| Constructor Summary | |
|---|---|
WindowResultSet(Activation activation,
NoPutResultSet source,
int rowAllocator,
int resultSetNumber,
int erdNumber,
GeneratedMethod restriction,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
Constructor |
|
| Method Summary | |
|---|---|
void |
close()
If the result set has been opened, close the open scan, else throw. |
private ExecRow |
getAllocatedRow()
Cache the ExecRow for this result set. |
ExecRow |
getNextRowCore()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
void |
openCore()
Open this ResultSet. |
void |
populateFromSourceRow(ExecRow srcrow,
ExecRow destrow)
Copy columns from srcrow into destrow, or insert ROW_NUMBER. |
void |
reopenCore()
Reopen this ResultSet. |
| 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private GeneratedMethod restriction
public NoPutResultSet source
public long restrictionTime
private FormatableBitSet referencedColumns
private ExecRow allocatedRow
private long rownumber
| Constructor Detail |
|---|
WindowResultSet(Activation activation,
NoPutResultSet source,
int rowAllocator,
int resultSetNumber,
int erdNumber,
GeneratedMethod restriction,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
throws StandardException
activation - The activationsource - Source result setrowAllocator - resultSetNumber - The resultSetNumbererdNumber - Int for ResultDescription
(so it can be turned back into an object)restriction - RestrictionoptimizerEstimatedRowCount - The optimizer's estimated number
of rows.optimizerEstimatedCost - The optimizer's estimated cost
StandardException| Method Detail |
|---|
public void openCore()
throws StandardException
StandardException - thrown if cursor finished.
public void reopenCore()
throws StandardException
reopenCore in interface NoPutResultSetreopenCore in class BasicNoPutResultSetImplStandardException - thrown if cursor finished.NoPutResultSet.openCore()
public ExecRow getNextRowCore()
throws StandardException
Restriction and projection parameters are evaluated for each row.
getNextRowCore in interface NoPutResultSetgetNextRowCore in class BasicNoPutResultSetImplStandardException - thrown on failure.
StandardException - ResultSetNotOpen thrown if not yet open.NoPutResultSet.getNextRowCore()
public void close()
throws StandardException
close in interface ResultSetclose in class NoPutResultSetImplStandardException - thrown on error
public void populateFromSourceRow(ExecRow srcrow,
ExecRow destrow)
throws StandardException
StandardException - thrown on failure to openpublic long getTimeSpent(int type)
type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
private ExecRow getAllocatedRow()
throws StandardException
StandardException - thrown on failure.
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||