org.apache.derby.impl.sql.execute
Class UpdateResultSet
java.lang.Object
org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
org.apache.derby.impl.sql.execute.DMLWriteResultSet
org.apache.derby.impl.sql.execute.UpdateResultSet
- All Implemented Interfaces:
- ResultSet
class UpdateResultSet
- extends DMLWriteResultSet
Update 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 update plan.
Constructor Summary |
UpdateResultSet(NoPutResultSet source,
GeneratedMethod generationClauses,
GeneratedMethod checkGM,
Activation activation)
|
UpdateResultSet(NoPutResultSet source,
GeneratedMethod generationClauses,
GeneratedMethod checkGM,
Activation activation,
ConstantAction passedInConstantAction,
ResultDescription passedInRsd)
|
UpdateResultSet(NoPutResultSet source,
GeneratedMethod generationClauses,
GeneratedMethod checkGM,
Activation activation,
int constantActionItem,
int rsdItem)
|
Methods inherited from class org.apache.derby.impl.sql.execute.NoRowsResultSetImpl |
checkRowPosition, clearCurrentRow, close, doesCommit, evaluateACheckConstraint, evaluateCheckConstraints, evaluateGenerationClauses, finish, getAbsoluteRow, getActivation, getAutoGeneratedKeysResultset, getBeginExecutionTimestamp, getCurrentTimeMillis, getCursorName, getEndExecutionTimestamp, getExecuteTime, getFirstRow, getLastRow, getNextRow, getPreviousRow, getQueryPlanText, getRelativeRow, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, returnsRows, setAfterLastRow, setBeforeFirstRow |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tc
private TransactionController tc
newBaseRow
private ExecRow newBaseRow
row
private ExecRow row
deferredSparseRow
private ExecRow deferredSparseRow
constants
UpdateConstantAction constants
resultDescription
private ResultDescription resultDescription
source
private NoPutResultSet source
savedSource
NoPutResultSet savedSource
rowChanger
private RowChanger rowChanger
deferredBaseCC
protected ConglomerateController deferredBaseCC
deferredUniqueCIDs
protected long[] deferredUniqueCIDs
deferredUniqueCreated
protected boolean[] deferredUniqueCreated
deferredUniqueCC
protected ConglomerateController[] deferredUniqueCC
deferredUniqueScans
protected ScanController[] deferredUniqueScans
deletedRowHolder
private TemporaryRowHolderImpl deletedRowHolder
insertedRowHolder
private TemporaryRowHolderImpl insertedRowHolder
riChecker
private RISetChecker riChecker
triggerInfo
private TriggerInfo triggerInfo
triggerActivator
private TriggerEventActivator triggerActivator
updatingReferencedKey
private boolean updatingReferencedKey
updatingForeignKey
private boolean updatingForeignKey
numOpens
private int numOpens
heapConglom
private long heapConglom
fkInfoArray
private FKInfo[] fkInfoArray
baseRowReadList
private FormatableBitSet baseRowReadList
generationClauses
private GeneratedMethod generationClauses
checkGM
private GeneratedMethod checkGM
resultWidth
private int resultWidth
numberOfBaseColumns
private int numberOfBaseColumns
deferredTempRow
private ExecRow deferredTempRow
deferredBaseRow
private ExecRow deferredBaseRow
oldDeletedRow
private ExecRow oldDeletedRow
triggerResultDescription
private ResultDescription triggerResultDescription
lockMode
int lockMode
deferred
boolean deferred
beforeUpdateCopyRequired
boolean beforeUpdateCopyRequired
UpdateResultSet
UpdateResultSet(NoPutResultSet source,
GeneratedMethod generationClauses,
GeneratedMethod checkGM,
Activation activation)
throws StandardException
- Parameters:
source
- update rows come from sourcegenerationClauses
- Generated method for computed generation clausescheckGM
- Generated method for enforcing check constraints
- Throws:
StandardException
- thrown on error
UpdateResultSet
UpdateResultSet(NoPutResultSet source,
GeneratedMethod generationClauses,
GeneratedMethod checkGM,
Activation activation,
int constantActionItem,
int rsdItem)
throws StandardException
- Parameters:
source
- update rows come from sourcegenerationClauses
- Generated method for computed generation clausescheckGM
- Generated method for enforcing check constraintsactivation
- ActivationconstantActionItem
- id of the update constant action saved objecrsdItem
- id of the Result Description saved object
- Throws:
StandardException
- thrown on error
UpdateResultSet
UpdateResultSet(NoPutResultSet source,
GeneratedMethod generationClauses,
GeneratedMethod checkGM,
Activation activation,
ConstantAction passedInConstantAction,
ResultDescription passedInRsd)
throws StandardException
- Parameters:
source
- update rows come from sourcegenerationClauses
- Generated method for computed generation clausescheckGM
- Generated method for enforcing check constraints
- Throws:
StandardException
- thrown on error
getResultDescription
public ResultDescription getResultDescription()
- Returns the description of the updated rows.
REVISIT: Do we want this to return NULL instead?
- Specified by:
getResultDescription
in interface ResultSet
- Overrides:
getResultDescription
in class NoRowsResultSetImpl
- Returns:
- A ResultDescription describing the results of the
statement.
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 from
open()
.
- Overrides:
setup
in class NoRowsResultSetImpl
- Throws:
StandardException
- Standard Derby error policy
checkStreamCols
private FormatableBitSet checkStreamCols()
objectifyStream
private void objectifyStream(ExecRow tempRow,
FormatableBitSet streamCols)
throws StandardException
- Throws:
StandardException
collectAffectedRows
public boolean collectAffectedRows()
throws StandardException
- Throws:
StandardException
notifyForUpdateCursor
private void notifyForUpdateCursor(DataValueDescriptor[] row,
DataValueDescriptor[] newBaseRow,
RowLocation rl,
TableScanResultSet tableScan)
throws StandardException
- Throws:
StandardException
saveLastCusorKey
private void saveLastCusorKey(TableScanResultSet tableScan,
ExecRow aRow)
throws StandardException
- Throws:
StandardException
fireBeforeTriggers
void fireBeforeTriggers()
throws StandardException
- Throws:
StandardException
fireAfterTriggers
void fireAfterTriggers()
throws StandardException
- Throws:
StandardException
updateDeferredRows
void updateDeferredRows()
throws StandardException
- Throws:
StandardException
runChecker
void runChecker(boolean restrictCheckOnly)
throws StandardException
- Throws:
StandardException
foundRow
public static boolean foundRow(ExecRow checkRow,
int[] colsToCheck,
TemporaryRowHolderImpl rowHolder)
throws StandardException
- Throws:
StandardException
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()
rowChangerFinish
void rowChangerFinish()
throws StandardException
- Throws:
StandardException
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.