NoPutResultSet
, ResultSet
, RowLocationRetRowSource
, RowSource
DependentResultSet
, HashScanResultSet
, LastIndexKeyResultSet
, TableScanResultSet
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 ]
BasicNoPutResultSetImpl.FieldComparator
Modifier and Type | Field | 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.
|
protected boolean |
fetchRowLocations |
true if the scan should pick up row locations
|
java.lang.String |
indexName |
|
(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.
|
java.lang.String |
tableName |
|
private boolean |
unspecifiedIsolationLevel |
If true, the isolation level is unspecified and must be refreshed on
each open.
|
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, TEMPORARY_RESULT_SET_NUMBER
checkNullCols, clonedExecRow, cncLen, resultSetNumber, targetResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
Constructor | 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 | 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.
|
protected void |
setRowLocationsState() |
Determine whether this scan should return row locations
|
org.w3c.dom.Element |
toXML(org.w3c.dom.Element parentNode,
java.lang.String tag) |
Produce an xml image of this ResultSet and its descendant ResultSets.
|
private int |
translateLanguageIsolationLevel(int languageLevel) |
Translate isolation level from language to store.
|
addWarning, attachStatementContext, checkCancellationFlag, checkRowPosition, childrenToXML, 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, toXML
openCore
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsRowLocationForDeferredCheckConstraints, needsToClone, offendingRowLocation, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, unpackHashValue, updateRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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 FormatableBitSet accessedCols
protected boolean fetchRowLocations
public java.lang.String tableName
public java.lang.String indexName
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 levelprotected void setRowLocationsState() throws StandardException
StandardException
private 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 occurspublic org.w3c.dom.Element toXML(org.w3c.dom.Element parentNode, java.lang.String tag) throws java.lang.Exception
ResultSet
Produce an xml image of this ResultSet and its descendant ResultSets. Appends an element to the parentNode and returns the appended element.
toXML
in interface ResultSet
toXML
in class BasicNoPutResultSetImpl
parentNode
- Node to put content into.tag
- Element tag for contentjava.lang.Exception
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.