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 FormatableBitSet
baseRowReadList
protected boolean
cascadeDelete
(package private) DeleteConstantAction
constants
protected ConglomerateController
deferredBaseCC
(package private) ExecRow
deferredBaseRow
(package private) ExecRow
deferredRLRow
(package private) ExecRow
deferredSparseRow
private boolean
firstExecute
private RISetChecker
fkChecker
protected FKInfo[]
fkInfoArray
(package private) int
lockMode
private boolean
noTriggersOrFks
(package private) int
numberOfBaseColumns
(package private) int
numIndexes
private int
numOpens
protected RowChanger
rc
private int
rlColumnNumber
private ExecRow
row
protected TemporaryRowHolderImpl
rowHolder
(package private) NoPutResultSet
savedSource
protected NoPutResultSet
source
private TransactionController
tc
private TriggerEventActivator
triggerActivator
private TriggerInfo
triggerInfo
-
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 void
cleanUp()
Tells the system to clean up on an error.void
close()
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) boolean
collectAffectedRows()
(package private) NoPutResultSet
createDependentSource(RowChanger rc)
create a source for the dependent table(package private) void
deleteDeferredRows()
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().(package private) void
fireAfterTriggers()
(package private) void
fireBeforeTriggers()
void
open()
Needs to be called before the result set will do anything.(package private) void
runFkChecker(boolean restrictCheckOnly)
Make sure foreign key constraints are not violated(package private) void
setup()
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 StandardException
Description copied from interface:ResultSet
Needs 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 StandardException
Description copied from class:NoRowsResultSetImpl
Set up the result set for use. Should always be called fromopen()
.- Overrides:
setup
in 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 StandardException
Make 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 StandardException
Description copied from interface:ResultSet
Tells the system to clean up on an error.- Throws:
StandardException
- Thrown on error- See Also:
ResultSet.cleanUp()
-
close
public void close() throws StandardException
Description copied from interface:ResultSet
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.- Throws:
StandardException
- Thrown on error.
-
finish
public void finish() throws StandardException
Description copied from interface:ResultSet
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(). Will close the result set if it is not already closed.- Specified by:
finish
in interfaceResultSet
- Overrides:
finish
in classNoRowsResultSetImpl
- Throws:
StandardException
- on error
-
-