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
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
FieldsModifier and TypeFieldDescriptionprivate FormatableBitSet
protected boolean
(package private) DeleteConstantAction
protected ConglomerateController
(package private) ExecRow
(package private) ExecRow
(package private) ExecRow
private boolean
private RISetChecker
protected FKInfo[]
(package private) int
private boolean
(package private) int
(package private) int
private int
protected RowChanger
private int
private ExecRow
protected TemporaryRowHolderImpl
(package private) NoPutResultSet
protected NoPutResultSet
private TransactionController
private TriggerEventActivator
private 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
ConstructorsConstructorDescriptionDeleteResultSet
(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
Modifier and TypeMethodDescriptionvoid
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
(package private) NoPutResultSet
create a source for the dependent table(package private) void
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
(package private) void
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 Details
-
tc
-
constants
DeleteConstantAction constants -
source
-
savedSource
NoPutResultSet savedSource -
numIndexes
int numIndexes -
rc
-
row
-
deferredBaseCC
-
rowHolder
-
numOpens
private int numOpens -
firstExecute
private boolean firstExecute -
baseRowReadList
-
rlColumnNumber
private int rlColumnNumber -
fkInfoArray
-
triggerInfo
-
fkChecker
-
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 Details
-
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 Details
-
open
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
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
- Throws:
StandardException
-
fireBeforeTriggers
- Throws:
StandardException
-
fireAfterTriggers
- Throws:
StandardException
-
deleteDeferredRows
- Throws:
StandardException
-
runFkChecker
Make sure foreign key constraints are not violated- Throws:
StandardException
-
createDependentSource
create a source for the dependent tableDelete Cascade ResultSet class will override this method.
- Throws:
StandardException
- Thrown on error
-
cleanUp
Description copied from interface:ResultSet
Tells the system to clean up on an error.- Throws:
StandardException
- Thrown on error- See Also:
-
close
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
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
-