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

pack-priv Class RowResultSet

extends NoPutResultSetImpl
implements CursorResultSet
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.execute.CursorResultSet, org.apache.derby.iapi.sql.ResultSet
Imports
org.apache.derby.iapi.services.monitor.Monitor, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.stream.HeaderPrintWriter, .InfoStreams, org.apache.derby.iapi.sql.execute.CursorResultSet, .ExecRow, .NoPutResultSet, org.apache.derby.iapi.sql.Activation, .ResultDescription, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.services.loader.GeneratedMethod, org.apache.derby.iapi.types.RowLocation

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.

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv
RowResultSet(Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)

pack-priv
RowResultSet(Activation activation, ExecRow constantRow, boolean canCacheRow, int resultSetNumber, 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.

Tells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet.

public ExecRow

Returns:

a null.
getCurrentRow
()

Implements org.apache.derby.iapi.sql.execute.CursorResultSet.getCurrentRow.

This is not used in positioned update and delete, so just return a null.

public ExecRow
getNextRowCore()

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

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

If open and not returned yet, returns the row after plugging the parameters into the expressions.

public RowLocation

Returns:

a null.
getRowLocation
()

Implements org.apache.derby.iapi.sql.execute.CursorResultSet.getRowLocation.

This is not operating against a stored table, so it has no row location to report.

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
Inherited from org.apache.derby.impl.sql.execute.NoPutResultSetImpl:
clearCurrentRowclearOrderableCachecloseRowSourcegetCursorNamegetNextRowFromRowSourcegetResultDescriptiongetValidColumnsisForUpdatemarkRowAsDeletedneedsRowLocationneedsRowLocationForDeferredCheckConstraintsneedsToCloneoffendingRowLocationpositionScanAtRowLocationprintQualifiersresultSetNumberrowLocationsetCurrentRowsetHasDeferrableCheckssetNeedsRowLocationsetTargetResultSetskipRowskipScanunpackHashValueupdateRow

Field Detail

cachedRowback to summary
private ExecRow cachedRow
canCacheRowback to summary
private boolean canCacheRow
nextback to summary
private boolean next
rowback to summary
private GeneratedMethod row
rowsReturnedback to summary
public int rowsReturned

Constructor Detail

RowResultSetback to summary
pack-priv RowResultSet(Activation activation, GeneratedMethod row, boolean canCacheRow, int resultSetNumber, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
RowResultSetback to summary
pack-priv RowResultSet(Activation activation, ExecRow constantRow, boolean canCacheRow, int resultSetNumber, 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.

Doc from org.apache.derby.iapi.sql.ResultSet.close.

Tells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet.

Exceptions
StandardException:
thrown on error
See Also
org.apache.derby.iapi.sql.ResultSet#close
getCurrentRowback to summary
public ExecRow getCurrentRow()

Implements org.apache.derby.iapi.sql.execute.CursorResultSet.getCurrentRow.

This is not used in positioned update and delete, so just return a null.

Returns:ExecRow

a null.

See Also
CursorResultSet
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.

If open and not returned yet, returns the row after plugging the parameters into the expressions.

Returns:ExecRow

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

the next row in the result

Exceptions
StandardException:
thrown on failure.
getRowLocationback to summary
public RowLocation getRowLocation()

Implements org.apache.derby.iapi.sql.execute.CursorResultSet.getRowLocation.

This is not operating against a stored table, so it has no row location to report.

Returns:RowLocation

a null.

See Also
CursorResultSet
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.

Sets state to 'open'.

Exceptions
StandardException:
thrown if activation closed.