|
|||||||||
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
org.apache.derby.impl.sql.execute.DependentResultSet
class DependentResultSet
DependentResultSet should be used by only ON DELETE CASCADE/ON DELETE SET NULL ref actions implementation to gather the rows from the dependent tables. Idea is to scan the foreign key index for the rows in the source table matelized temporary result set. Scanning of foreign key index gives us the rows that needs to be deleted on dependent tables. Using the row location we got from the index , base row is fetched.
Fields inherited from class org.apache.derby.impl.sql.execute.ScanResultSet |
---|
accessedCols, candidate, isolationLevel, lockMode |
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, isTopResultSet, nextTime, numOpens, openTime, optimizerEstimatedCost, optimizerEstimatedRowCount, resultDescription, rowsFiltered, rowsSeen, startExecutionTime, subqueryTrackingArray |
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
---|
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet |
---|
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE |
Constructor Summary | |
---|---|
DependentResultSet(long conglomId,
StaticCompiledOpenConglomInfo scoci,
Activation activation,
GeneratedMethod resultRowAllocator,
int resultSetNumber,
GeneratedMethod startKeyGetter,
int startSearchOperator,
GeneratedMethod stopKeyGetter,
int stopSearchOperator,
boolean sameStartStopPosition,
Qualifier[][] qualifiers,
java.lang.String tableName,
java.lang.String userSuppliedOptimizerOverrides,
java.lang.String indexName,
boolean isConstraint,
boolean forUpdate,
int colRefItem,
int lockMode,
boolean tableLocked,
int isolationLevel,
int rowsPerRead,
boolean oneRowScan,
double optimizerEstimatedRowCount,
double optimizerEstimatedCost,
java.lang.String parentResultSetId,
long fkIndexConglomId,
int fkColArrayItem,
int rltItem)
|
Method Summary | |
---|---|
private void |
addNewSources()
|
(package private) boolean |
canGetInstantaneousLocks()
Can we get instantaneous locks when getting share row locks at READ COMMITTED. |
void |
close()
Close the all the opens we did in this result set. |
private ExecRow |
fetchBaseRow()
Fetch the base row corresponding to the current index row |
private ExecRow |
fetchIndexRow()
Fetch a row from the index scan. |
void |
finish()
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). |
ExecRow |
getCurrentRow()
Returns the current row of the result set. |
private ExecRow |
getNextParentRow()
|
ExecRow |
getNextRowCore()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true. |
RowLocation |
getRowLocation()
Returns the row location of the current base table row of the cursor. |
java.util.Properties |
getScanProperties()
|
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
void |
openCore()
open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values... |
ConglomerateController |
openHeapConglomerateController()
|
private void |
openIndexScan(ExecRow searchRow)
|
private ScanController |
openIndexScanController(ExecRow searchRow)
Get a scan controller positioned using searchRow as the start/stop position. |
private java.lang.String |
printPosition(int searchOperator,
ExecIndexRow positioner)
Return a start or stop positioner as a String. |
java.lang.String |
printQualifiers()
Return an array of Qualifiers as a String |
java.lang.String |
printStartPosition()
|
java.lang.String |
printStopPosition()
|
private void |
reopenIndexScanController(ExecRow searchRow)
|
private void |
setupQualifierRow(ExecRow searchRow)
|
Methods inherited from class org.apache.derby.impl.sql.execute.ScanResultSet |
---|
getScanIsolationLevel, initIsolationLevel |
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.ResultSet |
---|
checkRowPosition, cleanUp, clearCurrentRow, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getRelativeRow, getResultDescription, getRowNumber, getSubqueryTrackingArray, getWarnings, isClosed, modifiedRowCount, open, returnsRows, setAfterLastRow, setBeforeFirstRow |
Field Detail |
---|
ConglomerateController heapCC
RowLocation baseRowLocation
ExecRow indexRow
IndexRow indexQualifierRow
ScanController indexSC
StaticCompiledOpenConglomInfo indexScoci
DynamicCompiledOpenConglomInfo indexDcoci
int numFkColumns
boolean isOpen
boolean deferred
TemporaryRowHolderResultSet source
TransactionController tc
java.lang.String parentResultSetId
int[] fkColArray
RowLocation rowLocation
TemporaryRowHolder[] sourceRowHolders
TemporaryRowHolderResultSet[] sourceResultSets
int[] sourceOpened
int sArrayIndex
java.util.Vector sVector
protected ScanController scanController
protected boolean scanControllerOpened
protected boolean isKeyed
protected boolean firstScan
protected ExecIndexRow startPosition
protected ExecIndexRow stopPosition
protected long conglomId
protected DynamicCompiledOpenConglomInfo heapDcoci
protected StaticCompiledOpenConglomInfo heapScoci
protected GeneratedMethod resultRowAllocator
protected GeneratedMethod startKeyGetter
protected int startSearchOperator
protected GeneratedMethod stopKeyGetter
protected int stopSearchOperator
protected Qualifier[][] qualifiers
public java.lang.String tableName
public java.lang.String userSuppliedOptimizerOverrides
public java.lang.String indexName
protected boolean runTimeStatisticsOn
public int rowsPerRead
public boolean forUpdate
private boolean sameStartStopPosition
private java.util.Properties scanProperties
public java.lang.String startPositionString
public java.lang.String stopPositionString
public boolean isConstraint
public boolean coarserLock
public boolean oneRowScan
protected long rowsThisScan
ExecRow searchRow
Constructor Detail |
---|
DependentResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, java.lang.String tableName, java.lang.String userSuppliedOptimizerOverrides, java.lang.String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost, java.lang.String parentResultSetId, long fkIndexConglomId, int fkColArrayItem, int rltItem) throws StandardException
StandardException
Method Detail |
---|
private ScanController openIndexScanController(ExecRow searchRow) throws StandardException
searchRow
- the row to match
StandardException
- on errorprivate void reopenIndexScanController(ExecRow searchRow) throws StandardException
StandardException
private void setupQualifierRow(ExecRow searchRow)
private void openIndexScan(ExecRow searchRow) throws StandardException
StandardException
private ExecRow fetchIndexRow() throws StandardException
StandardException
- Ooopsprivate ExecRow fetchBaseRow() throws StandardException
StandardException
- Ooopspublic ExecRow getNextRowCore() throws StandardException
NoPutResultSet
restriction and projection parameters are evaluated for each row.
getNextRowCore
in interface NoPutResultSet
getNextRowCore
in class BasicNoPutResultSetImpl
StandardException
- thrown if cursor finished.NoPutResultSet.getNextRowCore()
private ExecRow getNextParentRow() throws StandardException
StandardException
public ConglomerateController openHeapConglomerateController() throws StandardException
StandardException
public void close() throws StandardException
close
in interface ResultSet
close
in class ScanResultSet
StandardException
- if an error occurspublic void finish() throws StandardException
ResultSet
finish
in interface ResultSet
finish
in class BasicNoPutResultSetImpl
StandardException
- on errorpublic void openCore() throws StandardException
NoPutResultSet
openCore() can only be called on a closed result set. see reopenCore if you want to reuse an open result set.
For NoPutResultSet open() must only be called on the top ResultSet. Opening of NoPutResultSet's below the top result set are implemented by calling openCore.
openCore
in interface NoPutResultSet
StandardException
- thrown if cursor finished.private void addNewSources()
boolean canGetInstantaneousLocks()
canGetInstantaneousLocks
in class ScanResultSet
public long getTimeSpent(int type)
ResultSet
getTimeSpent
in interface ResultSet
type
- CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
public RowLocation getRowLocation() throws StandardException
CursorResultSet
getRowLocation
in interface CursorResultSet
StandardException
- thrown on failure to
get location from storage enginepublic ExecRow getCurrentRow() throws StandardException
CursorResultSet
getCurrentRow
in interface CursorResultSet
StandardException
- thrown on failure.public java.util.Properties getScanProperties()
public java.lang.String printStartPosition()
public java.lang.String printStopPosition()
private java.lang.String printPosition(int searchOperator, ExecIndexRow positioner)
public java.lang.String printQualifiers()
|
Built on Thu 2011-03-10 11:54:14+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |