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

pack-priv Class IndexRowToBaseRowResultSet

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.catalog.types.ReferencedColumnsDescriptorImpl, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.io.FormatableBitSet, org.apache.derby.iapi.services.loader.GeneratedMethod, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.Activation, org.apache.derby.iapi.sql.execute.CursorResultSet, .ExecRow, .ExecRowBuilder, .NoPutResultSet, org.apache.derby.iapi.store.access.ConglomerateController, .DynamicCompiledOpenConglomInfo, .StaticCompiledOpenConglomInfo, .TransactionController, org.apache.derby.iapi.types.DataValueDescriptor, .RowLocation, org.apache.derby.impl.sql.GenericPreparedStatement

Takes a result set with a RowLocation as the last column, and uses the RowLocation to get and return a row from the given base conglomerate. Normally, the input result set will be a TableScanResultSet scanning an index conglomerate.

Field Summary

Modifier and TypeField and Description
private int
private FormatableBitSet
private boolean
private FormatableBitSet
public FormatableBitSet
private ConglomerateController
pack-priv RowLocation
private boolean
pack-priv boolean
private DynamicCompiledOpenConglomInfo
private boolean
private int[]
public String
private GeneratedMethod
public long
private DataValueDescriptor[]
private StaticCompiledOpenConglomInfo
public NoPutResultSet
Inherited from org.apache.derby.impl.sql.execute.NoPutResultSetImpl:
checkNullColsclonedExecRowcncLenresultSetNumbertargetResultSet

Constructor Summary

AccessConstructor and Description
pack-priv
IndexRowToBaseRowResultSet(long conglomId, int scociItem, Activation a, NoPutResultSet source, int resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int allColRefItem, int heapOnlyColRefItem, int indexColMapItem, GeneratedMethod restriction, boolean forUpdate, double optimizerEstimatedRowCount, double optimizerEstimatedCost, int baseColumnCount)

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 ExecRow

Returns:

the last row returned.
getCurrentRow
()

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

Gets last row returned.

public ExecRow

Returns:

the next row in the result
getNextRowCore
()

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

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

Return the requested values computed from the next row (if any) for which the restriction evaluates to true.

public RowLocation

Returns:

the row location of the current cursor row.
getRowLocation
()

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

Return the RowLocation of the base row.

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 boolean

Returns:

Whether or not the result set is for update.
isForUpdate
()

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

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

Is this ResultSet or it's source result set for update.

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

Field Detail

_baseColumnCountback to summary
private int _baseColumnCount
_heapColsWithoutRowLocationback to summary
private FormatableBitSet _heapColsWithoutRowLocation
_includeRowLocationback to summary
private boolean _includeRowLocation
accessedAllColsback to summary
private FormatableBitSet accessedAllCols
accessedHeapColsback to summary
public FormatableBitSet accessedHeapCols
baseCCback to summary
private ConglomerateController baseCC
baseRowLocationback to summary
pack-priv RowLocation baseRowLocation
closeBaseCCHereback to summary
private boolean closeBaseCCHere
copiedFromSourceback to summary
pack-priv boolean copiedFromSource
dcociback to summary
private DynamicCompiledOpenConglomInfo dcoci
forUpdateback to summary
private boolean forUpdate
indexColsback to summary
private int[] indexCols
indexNameback to summary
public String indexName
restrictionback to summary
private GeneratedMethod restriction
restrictionTimeback to summary
public long restrictionTime
rowArrayback to summary
private DataValueDescriptor[] rowArray
scociback to summary
private StaticCompiledOpenConglomInfo scoci
sourceback to summary
public NoPutResultSet source

Constructor Detail

IndexRowToBaseRowResultSetback to summary
pack-priv IndexRowToBaseRowResultSet(long conglomId, int scociItem, Activation a, NoPutResultSet source, int resultRowAllocator, int resultSetNumber, String indexName, int heapColRefItem, int allColRefItem, int heapOnlyColRefItem, int indexColMapItem, GeneratedMethod restriction, boolean forUpdate, double optimizerEstimatedRowCount, double optimizerEstimatedCost, int baseColumnCount) throws StandardException

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
getCurrentRowback to summary
public ExecRow getCurrentRow() throws StandardException

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

Gets last row returned.

Returns:ExecRow

the last row returned.

Exceptions
StandardException:
thrown on failure.
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.

Return the requested values computed from the next row (if any) for which the restriction evaluates to true.

restriction and projection parameters are evaluated for each row.

Returns:ExecRow

the next row in the result

Exceptions
StandardException:
  • thrown on failure.
  • ResultSetNotOpen thrown if not yet open.
getRowLocationback to summary
public RowLocation getRowLocation() throws StandardException

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

Return the RowLocation of the base row.

Returns:RowLocation

the row location of the current cursor row.

Exceptions
StandardException:
thrown on failure.
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).

isForUpdateback to summary
public boolean isForUpdate()

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

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

Is this ResultSet or it's source result set for update. beetle 3865: updateable cursor using index scan. We didn't need this function before because we couldn't use index for update cursor.

Returns:boolean

Whether or not the result set is for update.

openCoreback to summary
public void openCore() throws StandardException

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

open this ResultSet.

Exceptions
StandardException:
thrown if cursor finished.
positionScanAtRowLocationback to summary
public void positionScanAtRowLocation(RowLocation rl) throws StandardException

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

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

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

Positions the cursor in the specified rowLocation. Used for scrollable insensitive result sets in order to position the cursor back to a row that has already be visited.

Parameters
rl:RowLocation

row location of the current cursor row

Exceptions
StandardException:
thrown on failure to get location from storage engine
See Also
Also remembers row location so that subsequent invocations of getCurrentRow will not read the index row to look up the row location base row, but reuse the saved row location.
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 this ResultSet.

Exceptions
StandardException:
thrown if cursor finished.