class SetConstraintsConstantAction extends DDLConstantAction
Note that the dependency action we send is SET_CONSTRAINTS rather than ALTER_TABLE. We do this because we want to distinguish SET_CONSTRAINTS from ALTER_TABLE for error messages.
Modifier and Type | Field and Description |
---|---|
private ConstraintDescriptorList |
cdl |
private UUID[] |
cuuids |
private boolean |
enable |
private UUID[] |
tuuids |
private boolean |
unconditionallyEnforce |
Constructor and Description |
---|
SetConstraintsConstantAction(ConstraintDescriptorList cdl,
boolean enable,
boolean unconditionallyEnforce)
Boilerplate
|
Modifier and Type | Method and Description |
---|---|
void |
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for DROP CONSTRAINT.
|
private ConstraintDescriptorList |
getConstraintDescriptorList(DataDictionary dd) |
private RowLocation |
getRowLocation(DataDictionary dd,
TableDescriptor td,
TransactionController tc) |
protected void |
publishToTargets(Activation activation)
Do the work of publishing any this action to any
replication targets.
|
java.lang.String |
toString() |
private void |
validateAllCheckConstraints(LanguageConnectionContext lcc,
java.util.Hashtable ht) |
private void |
validateFKConstraint(ForeignKeyConstraintDescriptor fk,
DataDictionary dd,
TransactionController tc,
ContextManager cm) |
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges
private boolean enable
private boolean unconditionallyEnforce
private ConstraintDescriptorList cdl
private UUID[] cuuids
private UUID[] tuuids
SetConstraintsConstantAction(ConstraintDescriptorList cdl, boolean enable, boolean unconditionallyEnforce)
cdl
- ConstraintDescriptorListenable
- true == turn them on, false == turn them offunconditionallyEnforce
- Replication sets this to true at
the end of REFRESH. This forces us
to run the included foreign key constraints even
if they're already marked ENABLED.public java.lang.String toString()
toString
in class java.lang.Object
public void executeConstantAction(Activation activation) throws StandardException
activation
- The execution environment for this constant action.StandardException
- Thrown on failureConstantAction.executeConstantAction(org.apache.derby.iapi.sql.Activation)
private void validateAllCheckConstraints(LanguageConnectionContext lcc, java.util.Hashtable ht) throws StandardException
StandardException
private void validateFKConstraint(ForeignKeyConstraintDescriptor fk, DataDictionary dd, TransactionController tc, ContextManager cm) throws StandardException
StandardException
private RowLocation getRowLocation(DataDictionary dd, TableDescriptor td, TransactionController tc) throws StandardException
StandardException
private ConstraintDescriptorList getConstraintDescriptorList(DataDictionary dd) throws StandardException
StandardException
protected void publishToTargets(Activation activation) throws StandardException
activation
- the activationStandardException
- on errorApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.