Class AnyResultSet
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
-
- org.apache.derby.impl.sql.execute.NoPutResultSetImpl
-
- org.apache.derby.impl.sql.execute.AnyResultSet
-
- All Implemented Interfaces:
NoPutResultSet
,ResultSet
,RowLocationRetRowSource
,RowSource
public class AnyResultSet extends NoPutResultSetImpl
Takes a quantified predicate subquery's result set. NOTE: A row with a single column containing null will be returned from getNextRow() if the underlying subquery ResultSet is empty.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
BasicNoPutResultSetImpl.FieldComparator
-
-
Field Summary
Fields Modifier and Type Field Description private GeneratedMethod
emptyRowFun
int
pointOfAttachment
private ExecRow
rowWithNulls
NoPutResultSet
source
private StatementContext
statementContext
int
subqueryNumber
-
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, TEMPORARY_RESULT_SET_NUMBER
-
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
-
-
Constructor Summary
Constructors Constructor Description AnyResultSet(NoPutResultSet s, Activation a, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
If the result set has been opened, close the open scan.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
getNextRowCore()
Return the requested value computed from the next row.int
getPointOfAttachment()
Return the point of attachment for this subquery.long
getTimeSpent(int type)
Return the total amount of time spent in this ResultSetvoid
openCore()
open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...void
reopenCore()
reopen a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...-
Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, unpackHashValue, updateRow
-
Methods inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, childrenToXML, cleanUp, dumpTimeStats, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML, toXML
-
-
-
-
Field Detail
-
rowWithNulls
private ExecRow rowWithNulls
-
statementContext
private StatementContext statementContext
-
source
public final NoPutResultSet source
-
emptyRowFun
private GeneratedMethod emptyRowFun
-
subqueryNumber
public int subqueryNumber
-
pointOfAttachment
public int pointOfAttachment
-
-
Constructor Detail
-
AnyResultSet
public AnyResultSet(NoPutResultSet s, Activation a, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
-
-
Method Detail
-
openCore
public void openCore() throws StandardException
open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...- Throws:
StandardException
- thrown if cursor finished.
-
reopenCore
public void reopenCore() throws StandardException
reopen a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...- Specified by:
reopenCore
in interfaceNoPutResultSet
- Overrides:
reopenCore
in classBasicNoPutResultSetImpl
- Throws:
StandardException
- thrown if cursor finished.- See Also:
NoPutResultSet.openCore()
-
finish
public void finish() throws StandardException
Description copied from interface:ResultSet
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(). Will close the result set if it is not already closed.- Specified by:
finish
in interfaceResultSet
- Overrides:
finish
in classBasicNoPutResultSetImpl
- Throws:
StandardException
- on error
-
getNextRowCore
public ExecRow getNextRowCore() throws StandardException
Return the requested value computed from the next row.- Specified by:
getNextRowCore
in interfaceNoPutResultSet
- Specified by:
getNextRowCore
in classBasicNoPutResultSetImpl
- Returns:
- the next row in the result
- Throws:
StandardException
- thrown on failure.- See Also:
NoPutResultSet.getNextRowCore()
-
close
public void close() throws StandardException
If the result set has been opened, close the open scan.- Specified by:
close
in interfaceResultSet
- Overrides:
close
in classNoPutResultSetImpl
- Throws:
StandardException
- thrown on error
-
getPointOfAttachment
public int getPointOfAttachment()
Description copied from interface:NoPutResultSet
Return the point of attachment for this subquery. (Only meaningful for Any and Once ResultSets, which can and will only be at the top of a ResultSet for a subquery.)- Specified by:
getPointOfAttachment
in interfaceNoPutResultSet
- Overrides:
getPointOfAttachment
in classBasicNoPutResultSetImpl
- Returns:
- int Point of attachment (result set number) for this subquery. (-1 if not a subquery - also Sanity violation)
- See Also:
NoPutResultSet.getPointOfAttachment()
-
getTimeSpent
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 ResultSet ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.- Returns:
- long The total amount of time spent (in milliseconds).
-
-