Class IndexRowToBaseRowResultSet
java.lang.Object
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet
- All Implemented Interfaces:
CursorResultSet
,NoPutResultSet
,ResultSet
,RowLocationRetRowSource
,RowSource
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
BasicNoPutResultSetImpl.FieldComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private FormatableBitSet
private boolean
private FormatableBitSet
private ConglomerateController
(package private) RowLocation
private boolean
(package private) boolean
private DynamicCompiledOpenConglomInfo
private boolean
private int[]
private GeneratedMethod
long
private DataValueDescriptor[]
private StaticCompiledOpenConglomInfo
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
ConstructorsConstructorDescriptionIndexRowToBaseRowResultSet
(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 TypeMethodDescriptionvoid
close()
If the result set has been opened, close the open scan.Gets last row returned.Return the requested values computed from the next row (if any) for which the restriction evaluates to true.Return the RowLocation of the base row.long
getTimeSpent
(int type) Return the total amount of time spent in this ResultSetboolean
Is this ResultSet or it's source result set for update.void
openCore()
open this ResultSet.void
Positions the cursor in the specified rowLocation.void
reopen this ResultSet.Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, 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, finish, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getScanIsolationLevel, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow, toXML, toXML
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet
addWarning, checkRowPosition, cleanUp, clearCurrentRow, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
-
Field Details
-
source
-
restriction
-
accessedHeapCols
-
accessedAllCols
-
indexName
-
indexCols
private int[] indexCols -
dcoci
-
scoci
-
baseCC
-
closeBaseCCHere
private boolean closeBaseCCHere -
forUpdate
private boolean forUpdate -
rowArray
-
baseRowLocation
RowLocation baseRowLocation -
copiedFromSource
boolean copiedFromSource -
restrictionTime
public long restrictionTime -
_baseColumnCount
private int _baseColumnCount -
_includeRowLocation
private boolean _includeRowLocation -
_heapColsWithoutRowLocation
-
-
Constructor Details
-
IndexRowToBaseRowResultSet
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 - Throws:
StandardException
-
-
Method Details
-
openCore
open this ResultSet.- Specified by:
openCore
in interfaceNoPutResultSet
- Throws:
StandardException
- thrown if cursor finished.
-
reopenCore
reopen this ResultSet.- Specified by:
reopenCore
in interfaceNoPutResultSet
- Overrides:
reopenCore
in classBasicNoPutResultSetImpl
- Throws:
StandardException
- thrown if cursor finished.- See Also:
-
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.
- Specified by:
getNextRowCore
in interfaceNoPutResultSet
- Specified by:
getNextRowCore
in classBasicNoPutResultSetImpl
- Returns:
- the next row in the result
- Throws:
StandardException
- thrown on failure.StandardException
- ResultSetNotOpen thrown if not yet open.- See Also:
-
close
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
-
getTimeSpent
public long getTimeSpent(int type) Return the total amount of time spent in this ResultSet- Specified by:
getTimeSpent
in interfaceResultSet
- 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).
-
getRowLocation
Return the RowLocation of the base row.- Specified by:
getRowLocation
in interfaceCursorResultSet
- Returns:
- the row location of the current cursor row.
- Throws:
StandardException
- thrown on failure.- See Also:
-
positionScanAtRowLocation
Description copied from interface:NoPutResultSet
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.- Specified by:
positionScanAtRowLocation
in interfaceNoPutResultSet
- Overrides:
positionScanAtRowLocation
in classNoPutResultSetImpl
- Parameters:
rl
- row location of the current cursor row- Throws:
StandardException
- thrown on failure to get location from storage engine- See Also:
-
getCurrentRow
Gets last row returned.- Specified by:
getCurrentRow
in interfaceCursorResultSet
- Returns:
- the last row returned.
- Throws:
StandardException
- thrown on failure.- See Also:
-
isForUpdate
public boolean 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.- Specified by:
isForUpdate
in interfaceNoPutResultSet
- Overrides:
isForUpdate
in classNoPutResultSetImpl
- Returns:
- Whether or not the result set is for update.
-