|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.impl.sql.execute.NoRowsResultSetImpl
org.apache.derby.impl.sql.execute.DMLWriteResultSet
org.apache.derby.impl.sql.execute.UpdateResultSet
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.
| Fields inherited from interface org.apache.derby.iapi.sql.ResultSet |
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST |
| Constructor Summary | |
UpdateResultSet(NoPutResultSet source,
GeneratedMethod checkGM,
Activation activation)
|
|
UpdateResultSet(NoPutResultSet source,
GeneratedMethod checkGM,
Activation activation,
ConstantAction passedInConstantAction,
ResultDescription passedInRsd)
|
|
UpdateResultSet(NoPutResultSet source,
GeneratedMethod checkGM,
Activation activation,
int constantActionItem,
int rsdItem)
|
|
| Method Summary | |
boolean |
checkRowPosition(int isType)
Determine if the cursor is before the first row in the result set. |
private FormatableBitSet |
checkStreamCols()
|
void |
cleanUp()
Tells the system to clean up on an error. |
void |
close()
No rows to return, does nothing |
boolean |
collectAffectedRows()
|
protected static int |
decodeLockMode(LanguageConnectionContext lcc,
int lockMode)
Decode the update lock mode. |
boolean |
doesCommit()
Does this ResultSet cause a commit or rollback. |
static void |
evaluateACheckConstraint(GeneratedMethod checkGM,
java.lang.String checkName,
long heapConglom,
Activation activation)
Run a check constraint against the current row. |
static void |
evaluateCheckConstraints(GeneratedMethod checkGM,
Activation activation)
Run check constraints against the current row. |
void |
finish()
doesn't need to do anything, as no calls are made that need to be restricted once the result set is 'finished'. |
(package private) void |
fireAfterTriggers()
|
(package private) void |
fireBeforeTriggers()
|
static boolean |
foundRow(ExecRow checkRow,
int[] colsToCheck,
TemporaryRowHolderImpl rowHolder)
|
ExecRow |
getAbsoluteRow(int row)
Returns the row at the absolute position from the query, and returns NULL when there is no such position. |
ResultSet |
getAutoGeneratedKeysResultset()
ResultSet for rows inserted into the table (contains auto-generated keys columns only) |
java.sql.Timestamp |
getBeginExecutionTimestamp()
Get the Timestamp for the beginning of execution. |
protected long |
getCurrentTimeMillis()
Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. |
java.lang.String |
getCursorName()
Return the cursor name, null in this case. |
java.sql.Timestamp |
getEndExecutionTimestamp()
Get the Timestamp for the end of execution. |
long |
getExecuteTime()
Get the execution time in milliseconds. |
ExecRow |
getFirstRow()
Returns the first row from the query, and returns NULL when there are no rows. |
(package private) java.lang.String |
getIndexNameFromCID(long indexCID)
get the index name given the conglomerate id of the index. |
ExecRow |
getLastRow()
Returns the last row from the query, and returns NULL when there are no rows. |
ExecRow |
getNextRow()
No rows to return, so throw an exception. |
protected ExecRow |
getNextRowCore(NoPutResultSet source)
Get next row from the source result set. |
ExecRow |
getPreviousRow()
Returns the previous row from the query, and returns NULL when there are no more previous rows. |
java.lang.String |
getQueryPlanText(int depth)
RESOLVE - This method will go away once it is overloaded in all subclasses. |
ExecRow |
getRelativeRow(int row)
Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. |
ResultDescription |
getResultDescription()
Returns the description of the updated rows. |
int |
getRowNumber()
Returns the row number of the current row. |
NoPutResultSet[] |
getSubqueryTrackingArray(int numSubqueries)
Get the subquery ResultSet tracking array from the top ResultSet. |
long |
getTimeSpent(int type)
Return the total amount of time spent in this ResultSet |
java.sql.SQLWarning |
getWarnings()
Return the set of warnings generated during the execution of this result set. |
boolean |
isClosed()
Just report that it is always closed. |
protected ExecRow |
makeDeferredSparseRow(ExecRow deferredBaseRow,
FormatableBitSet baseRowReadList,
LanguageConnectionContext lcc)
For deferred update, get a deferred sparse row based on the deferred non-sparse row. |
int |
modifiedRowCount()
Returns zero. |
private void |
notifyForUpdateCursor(DataValueDescriptor[] row,
DataValueDescriptor[] newBaseRow,
RowLocation rl,
TableScanResultSet tableScan)
|
private void |
objectifyStream(ExecRow tempRow,
FormatableBitSet streamCols)
|
void |
open()
Needs to be called before the result set will do anything. |
boolean |
returnsRows()
Returns FALSE |
(package private) void |
rowChangerFinish()
|
(package private) void |
runChecker(boolean restrictCheckOnly)
|
private void |
saveLastCusorKey(TableScanResultSet tableScan,
ExecRow aRow)
|
ExecRow |
setAfterLastRow()
Sets the current position to after the last row and returns NULL because there is no current row. |
ExecRow |
setBeforeFirstRow()
Sets the current position to before the first row and returns NULL because there is no current row. |
(package private) void |
setup()
|
(package private) void |
updateDeferredRows()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public TransactionController tc
public ExecRow newBaseRow
public ExecRow row
public ExecRow deferredSparseRow
public UpdateConstantAction constants
private ResultDescription resultDescription
private NoPutResultSet source
public NoPutResultSet savedSource
private RowChanger rowChanger
protected ConglomerateController deferredBaseCC
protected long[] deferredUniqueCIDs
protected boolean[] deferredUniqueCreated
protected ConglomerateController[] deferredUniqueCC
protected ScanController[] deferredUniqueScans
public LanguageConnectionContext lcc
private TemporaryRowHolderImpl deletedRowHolder
private TemporaryRowHolderImpl insertedRowHolder
private RISetChecker riChecker
private TriggerInfo triggerInfo
private TriggerEventActivator triggerActivator
private boolean updatingReferencedKey
private boolean updatingForeignKey
private int numOpens
private long heapConglom
private FKInfo[] fkInfoArray
private FormatableBitSet baseRowReadList
private GeneratedMethod checkGM
private int resultWidth
private int numberOfBaseColumns
private ExecRow deferredTempRow
private ExecRow deferredBaseRow
private ExecRow oldDeletedRow
private ResultDescription triggerResultDescription
int lockMode
boolean deferred
boolean beforeUpdateCopyRequired
protected WriteCursorConstantAction constantAction
protected int[] baseRowReadMap
protected int[] streamStorableHeapColIds
protected DynamicCompiledOpenConglomInfo heapDCOCI
protected DynamicCompiledOpenConglomInfo[] indexDCOCIs
public int rowCount
protected final Activation activation
protected NoPutResultSet[] subqueryTrackingArray
protected java.lang.String indent
protected java.lang.String subIndent
protected int sourceDepth
protected long beginTime
protected long endTime
protected long beginExecutionTime
protected long endExecutionTime
| Constructor Detail |
public UpdateResultSet(NoPutResultSet source,
GeneratedMethod checkGM,
Activation activation)
throws StandardException
source - update rows come from sourcecheckGM - Generated method for enforcing check constraints
StandardException - thrown on error
public UpdateResultSet(NoPutResultSet source,
GeneratedMethod checkGM,
Activation activation,
int constantActionItem,
int rsdItem)
throws StandardException
source - update rows come from sourcecheckGM - Generated method for enforcing check constraintsactivation - ActivationconstantActionItem - id of the update constant action saved objecrsdItem - id of the Result Description saved object
StandardException - thrown on error
public UpdateResultSet(NoPutResultSet source,
GeneratedMethod checkGM,
Activation activation,
ConstantAction passedInConstantAction,
ResultDescription passedInRsd)
throws StandardException
source - update rows come from sourcecheckGM - Generated method for enforcing check constraints
StandardException - thrown on error| Method Detail |
public ResultDescription getResultDescription()
getResultDescription in interface ResultSetgetResultDescription in class NoRowsResultSetImpl
public void open()
throws StandardException
ResultSet
StandardException - Standard Cloudscape error policy
void setup()
throws StandardException
StandardException - Standard Cloudscape error policyprivate FormatableBitSet checkStreamCols()
private void objectifyStream(ExecRow tempRow,
FormatableBitSet streamCols)
throws StandardException
StandardException
public boolean collectAffectedRows()
throws StandardException
StandardException
private void notifyForUpdateCursor(DataValueDescriptor[] row,
DataValueDescriptor[] newBaseRow,
RowLocation rl,
TableScanResultSet tableScan)
throws StandardException
StandardException
private void saveLastCusorKey(TableScanResultSet tableScan,
ExecRow aRow)
throws StandardException
StandardException
void fireBeforeTriggers()
throws StandardException
StandardException
void fireAfterTriggers()
throws StandardException
StandardException
void updateDeferredRows()
throws StandardException
StandardException
void runChecker(boolean restrictCheckOnly)
throws StandardException
StandardException
public static boolean foundRow(ExecRow checkRow,
int[] colsToCheck,
TemporaryRowHolderImpl rowHolder)
throws StandardException
StandardException
public void cleanUp()
throws StandardException
ResultSet
StandardException - Thrown on errorResultSet.cleanUp()
protected static int decodeLockMode(LanguageConnectionContext lcc,
int lockMode)
The value for update lock mode is in the 2nd 2 bytes for ExecutionContext.SERIALIZABLE_ISOLATION_LEVEL isolation level. Otherwise (REPEATABLE READ, READ COMMITTED, and READ UNCOMMITTED) the lock mode is located in the first 2 bytes.
This is done to override the optimizer choice to provide maximum concurrency of record level locking except in SERIALIZABLE where table level locking is required in heap scans for correctness.
See Compilation!QueryTree!FromBaseTable for encoding of the lockmode.
lcc - The context to look for current isolation level.lockMode - The compiled encoded lock mode for this query.
StandardException - Standard exception policy.
void rowChangerFinish()
throws StandardException
StandardExceptionpublic final int modifiedRowCount()
NoRowsResultSetImpl
modifiedRowCount in interface ResultSetmodifiedRowCount in class NoRowsResultSetImpl
protected ExecRow getNextRowCore(NoPutResultSet source)
throws StandardException
source - SourceResultSet
Also look at Track#2432/change 12433
StandardException
protected ExecRow makeDeferredSparseRow(ExecRow deferredBaseRow,
FormatableBitSet baseRowReadList,
LanguageConnectionContext lcc)
throws StandardException
StandardException - Thrown on errorjava.lang.String getIndexNameFromCID(long indexCID)
indexCID - conglomerate ID of the index.
public final boolean returnsRows()
returnsRows in interface ResultSet
public ExecRow getAbsoluteRow(int row)
throws StandardException
getAbsoluteRow in interface ResultSetrow - The position.
StandardException - Thrown on failureRow
public ExecRow getRelativeRow(int row)
throws StandardException
getRelativeRow in interface ResultSetrow - The position.
StandardException - Thrown on failureRow
public ExecRow setBeforeFirstRow()
throws StandardException
setBeforeFirstRow in interface ResultSetStandardException - Thrown on failureRow
public ExecRow getFirstRow()
throws StandardException
getFirstRow in interface ResultSetStandardException - Thrown on failureRow
public ExecRow getNextRow()
throws StandardException
getNextRow in interface ResultSetStandardException - Always throws a
StandardException to indicate
that this method is not intended to
be used.Row
public ExecRow getPreviousRow()
throws StandardException
getPreviousRow in interface ResultSetStandardException - Thrown on failureRow
public ExecRow getLastRow()
throws StandardException
getLastRow in interface ResultSetStandardException - Thrown on failureRow
public ExecRow setAfterLastRow()
throws StandardException
setAfterLastRow in interface ResultSetStandardException - Thrown on failureRowpublic boolean checkRowPosition(int isType)
checkRowPosition in interface ResultSetpublic int getRowNumber()
getRowNumber in interface ResultSet
public void close()
throws StandardException
close in interface ResultSetStandardException - thrown on errorpublic boolean isClosed()
isClosed in interface ResultSet
public void finish()
throws StandardException
finish in interface ResultSetStandardException - on errorpublic long getExecuteTime()
getExecuteTime in interface ResultSetpublic java.sql.Timestamp getBeginExecutionTimestamp()
getBeginExecutionTimestamp in interface ResultSetpublic java.sql.Timestamp getEndExecutionTimestamp()
getEndExecutionTimestamp in interface ResultSetpublic java.lang.String getQueryPlanText(int depth)
depth - Indentation level.
public long getTimeSpent(int type)
getTimeSpent in interface ResultSettype - CURRENT_RESULTSET_ONLY - time spent only in this ResultSet
ENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
public final NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)
ResultSet
getSubqueryTrackingArray in interface ResultSetnumSubqueries - The size of the array (For allocation on demand.)
ResultSet.getSubqueryTrackingArray(int)public ResultSet getAutoGeneratedKeysResultset()
ResultSet
getAutoGeneratedKeysResultset in interface ResultSetResultSet.getAutoGeneratedKeysResultset()public java.lang.String getCursorName()
getCursorName in interface ResultSetResultSet.getCursorName()protected final long getCurrentTimeMillis()
public static void evaluateACheckConstraint(GeneratedMethod checkGM,
java.lang.String checkName,
long heapConglom,
Activation activation)
throws StandardException
checkGM - Generated code to run the check constraint.checkName - Name of the constraint to check.heapConglom - Number of heap conglomerate.
StandardException - thrown on error
public static void evaluateCheckConstraints(GeneratedMethod checkGM,
Activation activation)
throws StandardException
checkGM - Generated code to run the check constraint.
StandardException - thrown on errorpublic boolean doesCommit()
public java.sql.SQLWarning getWarnings()
ResultSet
getWarnings in interface ResultSet
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||