org.apache.derby.impl.sql.execute
Class DMLWriteResultSet

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.NoRowsResultSetImpl
      extended by org.apache.derby.impl.sql.execute.DMLWriteResultSet
All Implemented Interfaces:
ResultSet
Direct Known Subclasses:
DeleteResultSet, DMLVTIResultSet, InsertResultSet, UpdateResultSet

abstract class DMLWriteResultSet
extends NoRowsResultSetImpl

For INSERT/UPDATE/DELETE impls. Used to tag them.


Field Summary
protected  int[] baseRowReadMap
           
protected  WriteCursorConstantAction constantAction
           
protected  ExecRow deferredSparseRow
           
protected  DynamicCompiledOpenConglomInfo heapDCOCI
           
protected  DynamicCompiledOpenConglomInfo[] indexDCOCIs
           
private  boolean needToObjectifyStream
           
 int rowCount
           
protected  int[] 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
DMLWriteResultSet(Activation activation)
          Constructor
DMLWriteResultSet(Activation activation, ConstantAction constantAction)
           
 
Method Summary
(package private)  int decodeLockMode(int lockMode)
          Decode the update lock mode.
(package private)  java.lang.String getIndexNameFromCID(long indexCID)
          get the index name given the conglomerate id of the index.
protected  ExecRow getNextRowCore(NoPutResultSet source)
          Get next row from the source result set.
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 objectifyStreams(ExecRow row)
           
 
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, getResultDescription, getRowNumber, getSubqueryTrackingArray, getTimeSpent, getWarnings, isClosed, returnsRows, setAfterLastRow, setBeforeFirstRow, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet
cleanUp, open
 

Field Detail

constantAction

protected WriteCursorConstantAction constantAction

baseRowReadMap

protected int[] baseRowReadMap

streamStorableHeapColIds

protected int[] streamStorableHeapColIds

deferredSparseRow

protected ExecRow deferredSparseRow

heapDCOCI

protected DynamicCompiledOpenConglomInfo heapDCOCI

indexDCOCIs

protected DynamicCompiledOpenConglomInfo[] indexDCOCIs

needToObjectifyStream

private boolean needToObjectifyStream

rowCount

public int rowCount
Constructor Detail

DMLWriteResultSet

DMLWriteResultSet(Activation activation)
            throws StandardException
Constructor

Parameters:
activation - an activation
Throws:
StandardException - on error

DMLWriteResultSet

DMLWriteResultSet(Activation activation,
                  ConstantAction constantAction)
            throws StandardException
Throws:
StandardException
Method Detail

modifiedRowCount

public final int modifiedRowCount()
Description copied from class: NoRowsResultSetImpl
Returns zero.

Specified by:
modifiedRowCount in interface ResultSet
Overrides:
modifiedRowCount in class NoRowsResultSetImpl
Returns:
The number of rows affect by the statement, so far.

getNextRowCore

protected ExecRow getNextRowCore(NoPutResultSet source)
                          throws StandardException
Get next row from the source result set.

Parameters:
source - SourceResultSet Also look at Track#2432/change 12433
Throws:
StandardException

objectifyStreams

private void objectifyStreams(ExecRow row)
                       throws StandardException
Throws:
StandardException

makeDeferredSparseRow

protected ExecRow makeDeferredSparseRow(ExecRow deferredBaseRow,
                                        FormatableBitSet baseRowReadList,
                                        LanguageConnectionContext lcc)
                                 throws StandardException
For deferred update, get a deferred sparse row based on the deferred non-sparse row. Share the underlying columns. If there is no column bit map, make them the same row.

Throws:
StandardException - Thrown on error

decodeLockMode

int decodeLockMode(int lockMode)
Decode the update lock mode.

The value for update lock mode is in the second most significant byte for ExecutionContext.SERIALIZABLE_ISOLATION_LEVEL isolation level. Otherwise (REPEATABLE READ, READ COMMITTED, and READ UNCOMMITTED) the lock mode is located in the least significant byte.

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.

Parameters:
lockMode - the compiled encoded lock mode for this query
Returns:
the lock mode (record or table) to use to open the result set
See Also:
FromBaseTable.updateTargetLockMode()

getIndexNameFromCID

java.lang.String getIndexNameFromCID(long indexCID)
get the index name given the conglomerate id of the index.

Parameters:
indexCID - conglomerate ID of the index.
Returns:
index name of given index.

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.