ConstantAction
AlterTableConstantAction
, ConstraintConstantAction
, CreateTriggerConstantAction
, DropTableConstantAction
, DropTriggerConstantAction
, IndexConstantAction
, RenameConstantAction
abstract class DDLSingleTableConstantAction extends DDLConstantAction
Modifier and Type | Field | Description |
---|---|---|
protected UUID |
tableId |
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
Constructor | Description |
---|---|
DDLSingleTableConstantAction(UUID tableId) |
constructor
|
Modifier and Type | Method | Description |
---|---|---|
(package private) void |
dropConglomerate(ConglomerateDescriptor congDesc,
TableDescriptor td,
boolean skipCreate,
java.util.List<ConstantAction> newConglomActions,
Activation activation,
LanguageConnectionContext lcc) |
See "dropConglomerate(...)" above.
|
(package private) void |
dropConglomerate(ConglomerateDescriptor congDesc,
TableDescriptor td,
Activation activation,
LanguageConnectionContext lcc) |
Similar to dropConstraint(...) above, except this method
drops a conglomerate directly instead of going through
a ConstraintDescriptor.
|
(package private) void |
dropConstraint(ConstraintDescriptor consDesc,
Activation activation,
LanguageConnectionContext lcc,
boolean clearDeps) |
Drop the constraint corresponding to the received descriptor.
|
(package private) void |
dropConstraint(ConstraintDescriptor consDesc,
TableDescriptor skipCreate,
java.util.List<ConstantAction> newConglomActions,
Activation activation,
LanguageConnectionContext lcc,
boolean clearDeps) |
See "dropConstraint(...") above.
|
(package private) void |
dropConstraint(ConstraintDescriptor consDesc,
TableDescriptor skipCreate,
Activation activation,
LanguageConnectionContext lcc,
boolean clearDeps) |
See "dropConstraint(...") above.
|
(package private) void |
executeConglomReplacement(ConstantAction replaceConglom,
Activation activation) |
Execute the received ConstantAction, which will create a
new physical conglomerate (or find an existing physical
conglomerate that is "sharable") to replace some dropped
physical conglomerate.
|
(package private) ConstantAction |
getConglomReplacementAction(ConglomerateDescriptor srcCD,
TableDescriptor td,
java.util.Properties properties) |
Create a ConstantAction which, when executed, will create a
new conglomerate whose attributes match those of the received
ConglomerateDescriptor.
|
private void |
loadIndexProperties(LanguageConnectionContext lcc,
ConglomerateDescriptor congDesc,
java.util.Properties ixProps) |
Get any table properties that exist for the received
index descriptor.
|
(package private) void |
recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull(ConglomerateDescriptor cd,
TableDescriptor td,
Activation activation,
LanguageConnectionContext lcc) |
Recreate backing index of unique constraint.
|
executeConstantAction
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges
protected UUID tableId
DDLSingleTableConstantAction(UUID tableId)
tableId
- the target tablevoid dropConstraint(ConstraintDescriptor consDesc, Activation activation, LanguageConnectionContext lcc, boolean clearDeps) throws StandardException
consDesc
- ConstraintDescriptor for the constraint to dropactivation
- Activation used when creating a new backing
index (if a new backing index is needed)lcc
- LanguageConnectionContext used for droppingclearDeps
- Whether or not to clear dependencies when
dropping the constraintStandardException
void dropConstraint(ConstraintDescriptor consDesc, TableDescriptor skipCreate, Activation activation, LanguageConnectionContext lcc, boolean clearDeps) throws StandardException
skipCreate
- Optional TableDescriptor. If non-null
then we will skip the "create new conglomerate" processing
*IF* the constraint that we drop came from the table
described by skipCreate.StandardException
void dropConstraint(ConstraintDescriptor consDesc, TableDescriptor skipCreate, java.util.List<ConstantAction> newConglomActions, Activation activation, LanguageConnectionContext lcc, boolean clearDeps) throws StandardException
newConglomActions
- Optional List. If non-null then
for each ConglomerateDescriptor for which we skip the
"create new conglomerate" processing we will add a
ConstantAction to this list. The constant action can
then be executed later (esp. by the caller) to create the
new conglomerate, if needed. If this argument is null and
we skip creation of a new conglomerate, the new conglomerate
is effectively ignored (which may be fine in some cases--
ex. when dropping a table).StandardException
void dropConglomerate(ConglomerateDescriptor congDesc, TableDescriptor td, Activation activation, LanguageConnectionContext lcc) throws StandardException
congDesc
- ConglomerateDescriptor for the conglom to droptd
- TableDescriptor for the table on which congDesc existsactivation
- Activation used when creating a new backing
index (if a new backing index is needed)lcc
- LanguageConnectionContext used for droppingStandardException
void dropConglomerate(ConglomerateDescriptor congDesc, TableDescriptor td, boolean skipCreate, java.util.List<ConstantAction> newConglomActions, Activation activation, LanguageConnectionContext lcc) throws StandardException
skipCreate
- If true then we will skip the "create
new conglomerate" processing for the dropped conglom.newConglomActions
- Optional List. If non-null then
for each ConglomerateDescriptor for which we skip the
"create new conglomerate" processing we will add a
ConstantAction to this list. The constant action can
then be executed later (esp. by the caller) to create the
new conglomerate, if needed. If this argument is null and
we skip creation of a new conglomerate, the new conglomerate
is effectively ignored (which may be fine in some cases--
ex. when dropping a table).StandardException
void recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull(ConglomerateDescriptor cd, TableDescriptor td, Activation activation, LanguageConnectionContext lcc) throws StandardException
cd
- ConglomerateDescritor to recreatetd
- TableDescriptor for table on which congDesc existsactivation
- Activation used when creating a new backing index
(if a new backing index is needed)lcc
- LanguageConnectionContext used for droppingStandardException
private void loadIndexProperties(LanguageConnectionContext lcc, ConglomerateDescriptor congDesc, java.util.Properties ixProps) throws StandardException
StandardException
ConstantAction getConglomReplacementAction(ConglomerateDescriptor srcCD, TableDescriptor td, java.util.Properties properties) throws StandardException
srcCD
- Descriptor describing what the replacement
physical conglomerate should look liketd
- Table descriptor for the table to which srcCD belongsproperties
- Properties from the old (dropped) conglom
that should be "forwarded" to the new (replacement) conglom.StandardException
void executeConglomReplacement(ConstantAction replaceConglom, Activation activation) throws StandardException
replaceConglom
- Constant action which, when executed,
will either create a new conglomerate or find an existing
one that satisfies the ConstantAction's requirements.activation
- Activation used when creating the conglomStandardException
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.