Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

public Class AnyResultSet

extends NoPutResultSetImpl
Class Inheritance
Imports
org.apache.derby.iapi.services.monitor.Monitor, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.stream.HeaderPrintWriter, org.apache.derby.iapi.sql.conn.StatementContext, org.apache.derby.iapi.sql.execute.NoPutResultSet, .ExecRow, org.apache.derby.iapi.sql.ResultSet, .Activation, org.apache.derby.iapi.types.DataValueDescriptor, org.apache.derby.iapi.services.loader.GeneratedMethod, org.apache.derby.shared.common.error.StandardException

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.

Field Summary

Modifier and TypeField and Description
private GeneratedMethod
public int
private ExecRow
public final NoPutResultSet
private StatementContext
public int
Inherited from org.apache.derby.impl.sql.execute.NoPutResultSetImpl:
checkNullColsclonedExecRowcncLenresultSetNumbertargetResultSet

Constructor Summary

AccessConstructor and Description
public
AnyResultSet(NoPutResultSet s, Activation a, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides org.apache.derby.impl.sql.execute.NoPutResultSetImpl.close.

Implements org.apache.derby.iapi.sql.ResultSet.close.

If the result set has been opened, close the open scan.

public void
finish()

Overrides org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finish.

Implements org.apache.derby.iapi.sql.ResultSet.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().

public ExecRow
public int
public long

Returns:

long The total amount of time spent (in milliseconds).
getTimeSpent
(int
CURRENT_RESULTSET_ONLY - time spent only in this ResultSet ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
type
)

Implements org.apache.derby.iapi.sql.ResultSet.getTimeSpent.

Return the total amount of time spent in this ResultSet

public void
public void
Inherited from org.apache.derby.impl.sql.execute.NoPutResultSetImpl:
clearCurrentRowclearOrderableCachecloseRowSourcegetCursorNamegetNextRowFromRowSourcegetResultDescriptiongetValidColumnsisForUpdatemarkRowAsDeletedneedsRowLocationneedsRowLocationForDeferredCheckConstraintsneedsToCloneoffendingRowLocationpositionScanAtRowLocationprintQualifiersresultSetNumberrowLocationsetCurrentRowsetHasDeferrableCheckssetNeedsRowLocationsetTargetResultSetskipRowskipScanunpackHashValueupdateRow

Field Detail

emptyRowFunback to summary
private GeneratedMethod emptyRowFun
pointOfAttachmentback to summary
public int pointOfAttachment
rowWithNullsback to summary
private ExecRow rowWithNulls
sourceback to summary
public final NoPutResultSet source
statementContextback to summary
private StatementContext statementContext

Hides org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.statementContext.

subqueryNumberback to summary
public int subqueryNumber

Constructor Detail

AnyResultSetback to summary
public AnyResultSet(NoPutResultSet s, Activation a, GeneratedMethod emptyRowFun, int resultSetNumber, int subqueryNumber, int pointOfAttachment, double optimizerEstimatedRowCount, double optimizerEstimatedCost)

Method Detail

closeback to summary
public void close() throws StandardException

Overrides org.apache.derby.impl.sql.execute.NoPutResultSetImpl.close.

Implements org.apache.derby.iapi.sql.ResultSet.close.

If the result set has been opened, close the open scan.

Exceptions
StandardException:
thrown on error
finishback to summary
public void finish() throws StandardException

Overrides org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finish.

Implements org.apache.derby.iapi.sql.ResultSet.finish.

Doc from org.apache.derby.iapi.sql.ResultSet.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(). Will close the result set if it is not already closed.

Exceptions
StandardException:
on error
getNextRowCoreback to summary
public ExecRow getNextRowCore() throws StandardException

Implements abstract org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRowCore.

Implements org.apache.derby.iapi.sql.execute.NoPutResultSet.getNextRowCore.

Return the requested value computed from the next row.

Returns:ExecRow

Doc from org.apache.derby.iapi.sql.execute.NoPutResultSet.getNextRowCore.

the next row in the result

Exceptions
StandardException:
thrown on failure.
getPointOfAttachmentback to summary
public int getPointOfAttachment()

Overrides org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getPointOfAttachment.

Implements org.apache.derby.iapi.sql.execute.NoPutResultSet.getPointOfAttachment.

Doc from org.apache.derby.iapi.sql.execute.NoPutResultSet.getPointOfAttachment.

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.)

Returns:int

int Point of attachment (result set number) for this subquery. (-1 if not a subquery - also Sanity violation)

See Also
NoPutResultSet#getPointOfAttachment
getTimeSpentback to summary
public long getTimeSpent(int type)

Implements org.apache.derby.iapi.sql.ResultSet.getTimeSpent.

Return the total amount of time spent in this ResultSet

Parameters
type:int

CURRENT_RESULTSET_ONLY - time spent only in this ResultSet ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.

Returns:long

long The total amount of time spent (in milliseconds).

openCoreback to summary
public void openCore() throws StandardException

Implements org.apache.derby.iapi.sql.execute.NoPutResultSet.openCore.

open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...

Exceptions
StandardException:
thrown if cursor finished.
reopenCoreback to summary
public void reopenCore() throws StandardException

Overrides org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.reopenCore.

Implements org.apache.derby.iapi.sql.execute.NoPutResultSet.reopenCore.

reopen a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...

Exceptions
StandardException:
thrown if cursor finished.