Class DeleteResultSet
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
-
- org.apache.derby.impl.sql.execute.DMLWriteResultSet
-
- org.apache.derby.impl.sql.execute.DeleteResultSet
-
- All Implemented Interfaces:
ResultSet
- Direct Known Subclasses:
DeleteCascadeResultSet
class DeleteResultSet extends DMLWriteResultSet
Delete the rows from the specified base table. This will cause constraints to be checked and triggers to be executed based on the c's and t's compiled into the insert plan.
-
-
Field Summary
Fields Modifier and Type Field Description private FormatableBitSetbaseRowReadListprotected booleancascadeDelete(package private) DeleteConstantActionconstantsprotected ConglomerateControllerdeferredBaseCC(package private) ExecRowdeferredBaseRow(package private) ExecRowdeferredRLRow(package private) ExecRowdeferredSparseRowprivate booleanfirstExecuteprivate RISetCheckerfkCheckerprotected FKInfo[]fkInfoArray(package private) intlockModeprivate booleannoTriggersOrFks(package private) intnumberOfBaseColumns(package private) intnumIndexesprivate intnumOpensprotected RowChangerrcprivate intrlColumnNumberprivate ExecRowrowprotected TemporaryRowHolderImplrowHolder(package private) NoPutResultSetsavedSourceprotected NoPutResultSetsourceprivate TransactionControllertcprivate TriggerEventActivatortriggerActivatorprivate TriggerInfotriggerInfo-
Fields inherited from class org.apache.derby.impl.sql.execute.DMLWriteResultSet
baseRowReadMap, cachedDestinations, constantAction, heapDCOCI, indexDCOCIs, resultDescription, rowCount, streamStorableHeapColIds
-
Fields inherited from class org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
activation, beginExecutionTime, beginTime, endExecutionTime, endTime, lcc
-
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
-
-
Constructor Summary
Constructors Constructor Description DeleteResultSet(NoPutResultSet source, Activation activation)DeleteResultSet(NoPutResultSet source, ConstantAction passedInConstantAction, Activation activation)REMIND: At present this takes just the conglomerate id of the table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Tells the system to clean up on an error.voidclose()Tells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet.(package private) booleancollectAffectedRows()(package private) NoPutResultSetcreateDependentSource(RowChanger rc)create a source for the dependent table(package private) voiddeleteDeferredRows()voidfinish()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().(package private) voidfireAfterTriggers()(package private) voidfireBeforeTriggers()voidopen()Needs to be called before the result set will do anything.(package private) voidrunFkChecker(boolean restrictCheckOnly)Make sure foreign key constraints are not violated(package private) voidsetup()Set up the result set for use.-
Methods inherited from class org.apache.derby.impl.sql.execute.DMLWriteResultSet
decodeLockMode, getIndexNameFromCID, getNextRowCore, getResultDescription, makeDeferredSparseRow, modifiedRowCount, normalizeRow, rememberConstraint
-
Methods inherited from class org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
addWarning, checkRowPosition, clearCurrentRow, close, doesCommit, evaluateGenerationClauses, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCurrentTimeMillis, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getQueryPlanText, getRelativeRow, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, returnsRows, setAfterLastRow, setBeforeFirstRow, toXML
-
-
-
-
Field Detail
-
tc
private TransactionController tc
-
constants
DeleteConstantAction constants
-
source
protected NoPutResultSet source
-
savedSource
NoPutResultSet savedSource
-
numIndexes
int numIndexes
-
rc
protected RowChanger rc
-
row
private ExecRow row
-
deferredBaseCC
protected ConglomerateController deferredBaseCC
-
rowHolder
protected TemporaryRowHolderImpl rowHolder
-
numOpens
private int numOpens
-
firstExecute
private boolean firstExecute
-
baseRowReadList
private FormatableBitSet baseRowReadList
-
rlColumnNumber
private int rlColumnNumber
-
fkInfoArray
protected FKInfo[] fkInfoArray
-
triggerInfo
private TriggerInfo triggerInfo
-
fkChecker
private RISetChecker fkChecker
-
triggerActivator
private TriggerEventActivator triggerActivator
-
noTriggersOrFks
private boolean noTriggersOrFks
-
deferredSparseRow
ExecRow deferredSparseRow
-
deferredBaseRow
ExecRow deferredBaseRow
-
lockMode
int lockMode
-
cascadeDelete
protected boolean cascadeDelete
-
deferredRLRow
ExecRow deferredRLRow
-
numberOfBaseColumns
int numberOfBaseColumns
-
-
Constructor Detail
-
DeleteResultSet
DeleteResultSet(NoPutResultSet source, Activation activation) throws StandardException
- Throws:
StandardException
-
DeleteResultSet
DeleteResultSet(NoPutResultSet source, ConstantAction passedInConstantAction, Activation activation) throws StandardException
REMIND: At present this takes just the conglomerate id of the table. We can expect this to expand to include passing information about triggers, constraints, and any additional conglomerates on the underlying table for access methods.- Throws:
StandardException- Thrown on error
-
-
Method Detail
-
open
public void open() throws StandardExceptionDescription copied from interface:ResultSetNeeds to be called before the result set will do anything. Need to call before getNextRow(), or for a result set that doesn't return rows, this is the call that will cause all the work to be done.- Throws:
StandardException- Standard Derby error policy
-
setup
void setup() throws StandardExceptionDescription copied from class:NoRowsResultSetImplSet up the result set for use. Should always be called fromopen().- Overrides:
setupin classNoRowsResultSetImpl- Throws:
StandardException- thrown on error
-
collectAffectedRows
boolean collectAffectedRows() throws StandardException- Throws:
StandardException
-
fireBeforeTriggers
void fireBeforeTriggers() throws StandardException- Throws:
StandardException
-
fireAfterTriggers
void fireAfterTriggers() throws StandardException- Throws:
StandardException
-
deleteDeferredRows
void deleteDeferredRows() throws StandardException- Throws:
StandardException
-
runFkChecker
void runFkChecker(boolean restrictCheckOnly) throws StandardExceptionMake sure foreign key constraints are not violated- Throws:
StandardException
-
createDependentSource
NoPutResultSet createDependentSource(RowChanger rc) throws StandardException
create a source for the dependent tableDelete Cascade ResultSet class will override this method.
- Throws:
StandardException- Thrown on error
-
cleanUp
public void cleanUp() throws StandardExceptionDescription copied from interface:ResultSetTells the system to clean up on an error.- Throws:
StandardException- Thrown on error- See Also:
ResultSet.cleanUp()
-
close
public void close() throws StandardExceptionDescription copied from interface:ResultSetTells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet.- Throws:
StandardException- Thrown on error.
-
finish
public void finish() throws StandardExceptionDescription copied from interface:ResultSetTells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). Will close the result set if it is not already closed.- Specified by:
finishin interfaceResultSet- Overrides:
finishin classNoRowsResultSetImpl- Throws:
StandardException- on error
-
-