|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
org.apache.derby.impl.sql.execute.NoPutResultSetImpl
org.apache.derby.impl.sql.execute.ScanResultSet
abstract class ScanResultSet
Abstract 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.
Example: if accessedCols indicates that we want to retrieve columns
1 and 4, then candidate row will have space for 5
columns (because that's the size of the rows in the underlying object),
but only cols "1" and "4" will have values:
0 1 2 3 4 [ - , COL1, - , - , COL4 ]
0 1 [ COL1, COL4 ]
Field Summary | |
---|---|
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. |
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. |
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 |
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
---|
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
Constructor Summary | |
---|---|
ScanResultSet(Activation activation,
int resultSetNumber,
GeneratedMethod resultRowAllocator,
int lockMode,
boolean tableLocked,
int isolationLevel,
int colRefItem,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost)
Construct a ScanResultSet . |
Method Summary | |
---|---|
(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. |
Methods inherited from class org.apache.derby.impl.sql.execute.NoPutResultSetImpl |
---|
clearCurrentRow, clearOrderableCache, closeRowSource, getCursorName, getNextRowFromRowSource, getResultDescription, getValidColumns, isForUpdate, markRowAsDeleted, needsRowLocation, needsToClone, positionScanAtRowLocation, printQualifiers, resultSetNumber, rowLocation, setCurrentRow, setNeedsRowLocation, setTargetResultSet, skipRow, skipScan, updateRow |
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.execute.NoPutResultSet |
---|
openCore |
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet |
---|
getTimeSpent |
Field Detail |
---|
private final boolean tableLocked
private final boolean unspecifiedIsolationLevel
private final int suppliedLockMode
private boolean isolationLevelNeedsUpdate
int lockMode
int isolationLevel
final ExecRow candidate
protected final FormatableBitSet accessedCols
Constructor Detail |
---|
ScanResultSet(Activation activation, int resultSetNumber, GeneratedMethod resultRowAllocator, 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)resultRowAllocator
- method which generates rowslockMode
- 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 cost
StandardException
Method Detail |
---|
void initIsolationLevel()
openCore()
methods.
private int getLockMode(int languageLevel)
languageLevel
- the (language) isolation level
private int translateLanguageIsolationLevel(int languageLevel)
languageLevel
- language isolation level
abstract 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 occurs
|
Built on Thu 2012-03-29 21:53:33+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |