| java.lang.Object org.apache.derby.impl.sql.execute.RowChangerImpl
RowChangerImpl | class RowChangerImpl implements RowChanger(Code) | | Perform row at a time DML operations of tables and maintain indexes.
|
Constructor Summary | |
public | RowChangerImpl(long heapConglom, StaticCompiledOpenConglomInfo heapSCOCI, DynamicCompiledOpenConglomInfo heapDCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, DynamicCompiledOpenConglomInfo[] indexDCOCIs, int numberOfColumns, int[] changedColumnIdsInput, TransactionController tc, FormatableBitSet baseRowReadList, int[] baseRowReadMap, Activation activation) Create a new RowChanger for performing update and delete operations
based on partial before and after rows.
Parameters: heapConglom - Conglomerate # for the heap Parameters: heapSCOCI - SCOCI for heap. Parameters: heapDCOCI - DCOCI for heap Parameters: irgs - the IndexRowGenerators for the table's indexes. |
Method Summary | |
public void | close() Close this RowChanger. | public void | deleteRow(ExecRow baseRow, RowLocation baseRowLocation) Delete a row from the table and perform associated index maintenance. | public void | finish() Finish processing the changes. | public ConglomerateController | getHeapConglomerateController() | public void | insertRow(ExecRow baseRow) Insert a row into the table and perform associated index maintenance. | public void | open(int lockMode) Open this RowChanger. | public void | open(int lockMode, boolean wait) | public void | openForUpdate(boolean[] fixOnUpdate, int lockMode, boolean wait) Open this RowChanger to avoid fixing indexes that do not change
during update operations. | public void | setIndexNames(String[] indexNames) | public void | setRowHolder(TemporaryRowHolder rowHolder) Set the row holder for this changer to use.
If the row holder is set, it wont bother
saving copies of rows needed for deferred
processing. | public void | updateRow(ExecRow oldBaseRow, ExecRow newBaseRow, RowLocation baseRowLocation) Update a row in the table and perform associated index maintenance. |
changedColumnIds | int[] changedColumnIds(Code) | | |
fixOnUpdate | boolean[] fixOnUpdate(Code) | | |
heapConglom | long heapConglom(Code) | | |
indexCIDS | long[] indexCIDS(Code) | | |
RowChangerImpl | public RowChangerImpl(long heapConglom, StaticCompiledOpenConglomInfo heapSCOCI, DynamicCompiledOpenConglomInfo heapDCOCI, IndexRowGenerator[] irgs, long[] indexCIDS, StaticCompiledOpenConglomInfo[] indexSCOCIs, DynamicCompiledOpenConglomInfo[] indexDCOCIs, int numberOfColumns, int[] changedColumnIdsInput, TransactionController tc, FormatableBitSet baseRowReadList, int[] baseRowReadMap, Activation activation) throws StandardException(Code) | | Create a new RowChanger for performing update and delete operations
based on partial before and after rows.
Parameters: heapConglom - Conglomerate # for the heap Parameters: heapSCOCI - SCOCI for heap. Parameters: heapDCOCI - DCOCI for heap Parameters: irgs - the IndexRowGenerators for the table's indexes. We usepositions in this array as local id's for indexes. To support updates,only indexes that change need be included. Parameters: indexCIDS - the conglomerateids for the table's idexes. indexCIDS[ix] corresponds to the same index as irgs[ix]. Parameters: indexSCOCIs - the SCOCIs for the table's idexes. indexSCOCIs[ix] corresponds to the same index as irgs[ix]. Parameters: indexDCOCIs - the DCOCIs for the table's idexes. indexDCOCIs[ix] corresponds to the same index as irgs[ix]. Parameters: numberOfColumns - Number of columns in partial write row. Parameters: changedColumnIdsInput - array of 1 based ints indicating the columnsto be updated. Only used for updates Parameters: tc - the transaction controller Parameters: baseRowReadList - bit set of columns read from base row. 1 based. Parameters: baseRowReadMap - BaseRowReadMap[heapColId]->ReadRowColumnId. (0 based) exception: StandardException - Thrown on error |
deleteRow | public void deleteRow(ExecRow baseRow, RowLocation baseRowLocation) throws StandardException(Code) | | Delete a row from the table and perform associated index maintenance.
Parameters: baseRow - the row. Parameters: baseRowLocation - the row's base conglomeratelocation exception: StandardException - Thrown on error |
finish | public void finish() throws StandardException(Code) | | Finish processing the changes. This means applying the deferred
inserts for updates to unique indexes.
exception: StandardException - Thrown on error |
open | public void open(int lockMode) throws StandardException(Code) | | Open this RowChanger.
Note to avoid the cost of fixing indexes that do not
change during update operations use openForUpdate().
Parameters: lockMode - The lock mode to use(row or table, see TransactionController) exception: StandardException - thrown on failure to convert |
openForUpdate | public void openForUpdate(boolean[] fixOnUpdate, int lockMode, boolean wait) throws StandardException(Code) | | Open this RowChanger to avoid fixing indexes that do not change
during update operations.
Parameters: fixOnUpdate - fixOnUpdat[ix] == true ==> fix index 'ix' onan update operation. Parameters: lockMode - The lock mode to use(row or table, see TransactionController) Parameters: wait - If true, then the caller wants to wait for locks. False will bewhen we using a nested user xaction - we want to timeout right awayif the parent holds the lock. (bug 4821) exception: StandardException - thrown on failure to convert |
setRowHolder | public void setRowHolder(TemporaryRowHolder rowHolder)(Code) | | Set the row holder for this changer to use.
If the row holder is set, it wont bother
saving copies of rows needed for deferred
processing. Also, it will never close the
passed in rowHolder.
Parameters: rowHolder - the TemporaryRowHolder |
updateRow | public void updateRow(ExecRow oldBaseRow, ExecRow newBaseRow, RowLocation baseRowLocation) throws StandardException(Code) | | Update a row in the table and perform associated index maintenance.
Parameters: oldBaseRow - the old image of the row. Parameters: newBaseRow - the new image of the row. Parameters: baseRowLocation - the row's base conglomeratelocation exception: StandardException - Thrown on error |
|
|