abstract class ScanResultSet extends NoPutResultSetImpl
ResultSet
class for NoPutResultSet
s which
contain a scan. Returns rows that may be a column sub-set of the
rows in the underlying object to be scanned. If accessedCols is
not null then a sub-set of columns will be fetched from the underlying
object (usually into the candidate row object), then the returned
rows will be a compacted form of that row, with the not-fetched columns
moved out. If accessedCols is null then the full row will be returned.
0 1 2 3 4 [ - , COL1, - , - , COL4 ]
0 1 [ COL1, COL4 ]
Modifier and Type | Field and Description |
---|---|
protected FormatableBitSet |
accessedCols
If not null indicates the subset of columns that
need to be pulled from the underlying object to be scanned.
|
(package private) ExecRow |
candidate
The candidate row, matches the shape of the rows in
the underlying object to be scanned.
|
(package private) int |
isolationLevel
The scan isolation level.
|
private boolean |
isolationLevelNeedsUpdate
Tells whether the isolation level needs to be updated.
|
(package private) int |
lockMode
The actual lock mode used.
|
(package private) ExecRowBuilder |
resultRowBuilder
Object used to create and reset the candidate row.
|
private int |
suppliedLockMode
The lock mode supplied through the constructor.
|
private boolean |
tableLocked
If true, the table is marked as table locked in SYS.SYSTABLES.
|
private boolean |
unspecifiedIsolationLevel
If true, the isolation level is unspecified and must be refreshed on
each open.
|
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
activation, beginTime, closeTime, compactRow, constructorTime, currentRow, endExecutionTime, finished, isOpen, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
Constructor and Description |
---|
ScanResultSet(Activation activation,
int resultSetNumber,
int resultRowTemplate,
int lockMode,
boolean tableLocked,
int isolationLevel,
int colRefItem,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
Construct a
ScanResultSet . |
Modifier and Type | Method and Description |
---|---|
(package private) abstract boolean |
canGetInstantaneousLocks()
Can we get instantaneous locks when getting share row
locks at READ COMMITTED.
|
void |
close()
Close the result set.
|
private int |
getLockMode(int languageLevel)
Get the lock mode based on the language isolation level.
|
int |
getScanIsolationLevel()
Return the isolation level of the scan in the result set.
|
(package private) void |
initIsolationLevel()
Initialize the isolation level and the lock mode.
|
private int |
translateLanguageIsolationLevel(int languageLevel)
Translate isolation level from language to store.
|
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsToClone, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, updateRow
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, cleanUp, dumpTimeStats, finish, finishAndRTS, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCompactRow, getCurrentTimeMillis, getElapsedMillis, getEndExecutionTimestamp, getEstimatedRowCount, getExecuteTime, getExecutionFactory, getFirstRow, getLanguageConnectionContext, getLastRow, getNextRow, getNextRowCore, getPointOfAttachment, getPreviousRow, getRelativeRow, getRowNumber, getSubqueryTrackingArray, getTransactionController, getWarnings, isClosed, isXplainOnlyMode, markAsTopResultSet, modifiedRowCount, open, recordConstructorTime, reopenCore, requiresRelocking, returnsRows, setAfterLastRow, setBeforeFirstRow, setCompactRow, setCompatRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
openCore
getTimeSpent
private final boolean tableLocked
private final boolean unspecifiedIsolationLevel
private final int suppliedLockMode
private boolean isolationLevelNeedsUpdate
int lockMode
int isolationLevel
final ExecRowBuilder resultRowBuilder
final ExecRow candidate
protected final FormatableBitSet accessedCols
ScanResultSet(Activation activation, int resultSetNumber, int resultRowTemplate, int lockMode, boolean tableLocked, int isolationLevel, int colRefItem, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException
ScanResultSet
.activation
- the activationresultSetNumber
- number of the result set (unique within statement)resultRowTemplate
- identifier of saved object for row templatelockMode
- lock mode (record or table)tableLocked
- true if marked as table locked in SYS.SYSTABLESisolationLevel
- language isolation level for the result setcolRefItem
- Identifier of saved object for accessedCols,
-1 if need to fetch all columns.optimizerEstimatedRowCount
- estimated row countoptimizerEstimatedCost
- estimated costStandardException
void initIsolationLevel()
openCore()
methods.private int getLockMode(int languageLevel)
languageLevel
- the (language) isolation levelprivate int translateLanguageIsolationLevel(int languageLevel)
languageLevel
- language isolation levelabstract boolean canGetInstantaneousLocks()
public int getScanIsolationLevel()
getScanIsolationLevel
in interface NoPutResultSet
getScanIsolationLevel
in class BasicNoPutResultSetImpl
NoPutResultSet.getScanIsolationLevel()
public void close() throws StandardException
close
in interface ResultSet
close
in class NoPutResultSetImpl
StandardException
- if an error occursApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.