| java.lang.Object org.apache.derby.impl.sql.execute.IndexChanger
IndexChanger | public class IndexChanger (Code) | | Perform Index maintenace associated with DML operations for a single index.
|
Constructor Summary | |
public | IndexChanger(IndexRowGenerator irg, long indexCID, StaticCompiledOpenConglomInfo indexSCOCI, DynamicCompiledOpenConglomInfo indexDCOCI, String indexName, ConglomerateController baseCC, TransactionController tc, int lockMode, FormatableBitSet baseRowReadMap, int isolationLevel, Activation activation) Create an IndexChanger
Parameters: irg - the IndexRowGenerator for the index. Parameters: indexCID - the conglomerate id for the index. Parameters: indexSCOCI - the SCOCI for the idexes. |
Method Summary | |
public void | close() Close this IndexChanger. | public void | delete(ExecRow baseRow, RowLocation baseRowLocation) Perform index maintenance to support a delete of a base table row. | public void | finish() Finish doing the changes for this index. | public void | insert(ExecRow newRow, RowLocation baseRowLocation) Perform index maintenance to support an insert of a base table row. | void | insertForUpdate(ExecRow newRow, RowLocation baseRowLocation) If we're updating a unique index, the inserts have to be
deferred. | public void | open() Open this IndexChanger. | public void | setBaseCC(ConglomerateController baseCC) Propagate the heap's ConglomerateController to
this index changer. | public void | setRowHolder(TemporaryRowHolderImpl 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 | update(ExecRow oldBaseRow, ExecRow newBaseRow, RowLocation baseRowLocation) Perform index maintenance to support an update of a base table row. |
IndexChanger | public IndexChanger(IndexRowGenerator irg, long indexCID, StaticCompiledOpenConglomInfo indexSCOCI, DynamicCompiledOpenConglomInfo indexDCOCI, String indexName, ConglomerateController baseCC, TransactionController tc, int lockMode, FormatableBitSet baseRowReadMap, int isolationLevel, Activation activation) throws StandardException(Code) | | Create an IndexChanger
Parameters: irg - the IndexRowGenerator for the index. Parameters: indexCID - the conglomerate id for the index. Parameters: indexSCOCI - the SCOCI for the idexes. Parameters: indexDCOCI - the DCOCI for the idexes. Parameters: baseCC - the ConglomerateController for the base table. Parameters: tc - The TransactionController Parameters: lockMode - The lock mode (granularity) to use Parameters: baseRowReadMap - Map of columns read in. 1 based. Parameters: isolationLevel - Isolation level to use. Parameters: activation - Current activation exception: StandardException - Thrown on error |
delete | public void delete(ExecRow baseRow, RowLocation baseRowLocation) throws StandardException(Code) | | Perform index maintenance to support a delete of a base table row.
Parameters: baseRow - the base table row. Parameters: baseRowLocation - the base table row's location. exception: StandardException - Thrown on error |
finish | public void finish() throws StandardException(Code) | | Finish doing the changes for this index. This is intended for deferred
inserts for unique indexes. It has no effect unless we are doing an
update of a unique index.
exception: StandardException - Thrown on error |
insert | public void insert(ExecRow newRow, RowLocation baseRowLocation) throws StandardException(Code) | | Perform index maintenance to support an insert of a base table row.
Parameters: newRow - the base table row. Parameters: baseRowLocation - the base table row's location. exception: StandardException - Thrown on error |
insertForUpdate | void insertForUpdate(ExecRow newRow, RowLocation baseRowLocation) throws StandardException(Code) | | If we're updating a unique index, the inserts have to be
deferred. This is to avoid uniqueness violations that are only
temporary. If we do all the deletes first, only "true" uniqueness
violations can happen. We do this here, rather than in open(),
because this is the only operation that requires deferred inserts,
and we only want to create the conglomerate if necessary.
Parameters: newRow - the base table row. Parameters: baseRowLocation - the base table row's location. exception: StandardException - Thrown on error |
setBaseCC | public void setBaseCC(ConglomerateController baseCC)(Code) | | Propagate the heap's ConglomerateController to
this index changer.
Parameters: baseCC - The heap's ConglomerateController. |
setRowHolder | public void setRowHolder(TemporaryRowHolderImpl 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 row holder |
update | public void update(ExecRow oldBaseRow, ExecRow newBaseRow, RowLocation baseRowLocation) throws StandardException(Code) | | Perform index maintenance to support an update of a base table row.
Parameters: oldBaseRow - the old image of the base table row. Parameters: newBaseRow - the new image of the base table row. Parameters: baseRowLocation - the base table row's location. exception: StandardException - Thrown on error |
|
|