|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.impl.sql.execute.RowChangerImpl
Perform row at a time DML operations of tables and maintain indexes.
| Constructor Summary | |
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. |
|
| Method Summary | |
void |
close()
Close this RowChanger. |
void |
deleteRow(ExecRow baseRow,
RowLocation baseRowLocation)
Delete a row from the table and perform associated index maintenance. |
void |
finish()
Finish processing the changes. |
ConglomerateController |
getHeapConglomerateController()
Return the ConglomerateController from this RowChanger. |
void |
insertRow(ExecRow baseRow)
Insert a row into the table and perform associated index maintenance. |
void |
open(int lockMode)
Open this RowChanger. |
void |
openForUpdate(boolean[] fixOnUpdate,
int lockMode,
boolean wait)
Open this RowChanger to avoid fixing indexes that do not change during update operations. |
void |
setIndexNames(java.lang.String[] indexNames)
Sets the index names of the tables indices. |
void |
setRowHolder(TemporaryRowHolder rowHolder)
Set the row holder for this changer to use. |
private int[] |
sortArray(int[] input)
|
void |
updateRow(ExecRow oldBaseRow,
ExecRow newBaseRow,
RowLocation baseRowLocation)
Update a row in the table and perform associated index maintenance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
boolean isOpen
boolean[] fixOnUpdate
long heapConglom
DynamicCompiledOpenConglomInfo heapDCOCI
StaticCompiledOpenConglomInfo heapSCOCI
long[] indexCIDS
DynamicCompiledOpenConglomInfo[] indexDCOCIs
StaticCompiledOpenConglomInfo[] indexSCOCIs
IndexRowGenerator[] irgs
Activation activation
TransactionController tc
FormatableBitSet changedColumnBitSet
FormatableBitSet baseRowReadList
protected int[] baseRowReadMap
int[] changedColumnIds
TemporaryRowHolderImpl rowHolder
java.lang.String[] indexNames
protected ConglomerateController baseCC
protected RowLocation baseRowLocation
IndexSetChanger isc
private DataValueDescriptor[] sparseRowArray
private int[] partialChangedColumnIds
| Constructor Detail |
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
heapConglom - Conglomerate # for the heapheapSCOCI - SCOCI for heap.heapDCOCI - DCOCI for heapirgs - the IndexRowGenerators for the table's indexes. We use
positions in this array as local id's for indexes. To support updates,
only indexes that change need be included.indexCIDS - the conglomerateids for the table's idexes.
indexCIDS[ix] corresponds to the same index as irgs[ix].indexSCOCIs - the SCOCIs for the table's idexes.
indexSCOCIs[ix] corresponds to the same index as irgs[ix].indexDCOCIs - the DCOCIs for the table's idexes.
indexDCOCIs[ix] corresponds to the same index as irgs[ix].numberOfColumns - Number of columns in partial write row.changedColumnIdsInput - array of 1 based ints indicating the columns
to be updated. Only used for updatestc - the transaction controllerbaseRowReadList - bit set of columns read from base row. 1 based.baseRowReadMap - BaseRowReadMap[heapColId]->ReadRowColumnId. (0 based)
StandardException - Thrown on error| Method Detail |
public void setRowHolder(TemporaryRowHolder rowHolder)
setRowHolder in interface RowChangerrowHolder - the TemporaryRowHolderpublic void setIndexNames(java.lang.String[] indexNames)
RowChanger
setIndexNames in interface RowChangerindexNames - Names of all the indices on this table.RowChanger.setIndexNames(java.lang.String[])
public void open(int lockMode)
throws StandardException
Note to avoid the cost of fixing indexes that do not change during update operations use openForUpdate().
open in interface RowChangerlockMode - The lock mode to use
(row or table, see TransactionController)
StandardException - thrown on failure to convert
public void openForUpdate(boolean[] fixOnUpdate,
int lockMode,
boolean wait)
throws StandardException
openForUpdate in interface RowChangerfixOnUpdate - fixOnUpdat[ix] == true ==> fix index 'ix' on
an update operation.lockMode - The lock mode to use
(row or table, see TransactionController)wait - If true, then the caller wants to wait for locks. False will be
when we using a nested user xaction - we want to timeout right away
if the parent holds the lock. (bug 4821)
StandardException - thrown on failure to convert
public void insertRow(ExecRow baseRow)
throws StandardException
insertRow in interface RowChangerbaseRow - the row.
StandardException - Thrown on error
public void deleteRow(ExecRow baseRow,
RowLocation baseRowLocation)
throws StandardException
deleteRow in interface RowChangerbaseRow - the row.baseRowLocation - the row's base conglomerate
location
StandardException - Thrown on error
public void updateRow(ExecRow oldBaseRow,
ExecRow newBaseRow,
RowLocation baseRowLocation)
throws StandardException
updateRow in interface RowChangeroldBaseRow - the old image of the row.newBaseRow - the new image of the row.baseRowLocation - the row's base conglomerate
location
StandardException - Thrown on error
public void finish()
throws StandardException
finish in interface RowChangerStandardException - Thrown on error
public void close()
throws StandardException
close in interface RowChangerStandardException - Thrown on errorpublic ConglomerateController getHeapConglomerateController()
RowChanger
getHeapConglomerateController in interface RowChangerRowChanger.getHeapConglomerateController()private int[] sortArray(int[] input)
|
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 | |||||||||