ConstantAction
AlterConstraintConstantAction
, CreateConstraintConstantAction
, DropConstraintConstantAction
public abstract class ConstraintConstantAction extends DDLSingleTableConstantAction
Modifier and Type | Field | Description |
---|---|---|
protected UUID |
constraintId |
|
protected java.lang.String |
constraintName |
|
protected int |
constraintType |
|
protected IndexConstantAction |
indexAction |
|
protected UUID |
schemaId |
|
protected java.lang.String |
schemaName |
|
protected java.lang.String |
tableName |
WHEN_MATCHED_THEN_DELETE, WHEN_MATCHED_THEN_UPDATE, WHEN_NOT_MATCHED_THEN_INSERT
tableId
Constructor | Description |
---|---|
ConstraintConstantAction(java.lang.String constraintName,
int constraintType,
java.lang.String tableName,
UUID tableId,
java.lang.String schemaName,
IndexConstantAction indexAction) |
Make one of these puppies.
|
Modifier and Type | Method | Description |
---|---|---|
UUID |
getConstraintId() |
Get the constraint id of the constraint
|
java.lang.String |
getConstraintName() |
Get the constraint name
|
int |
getConstraintType() |
Get the constraint type.
|
IndexConstantAction |
getIndexAction() |
Get the associated index constant action.
|
(package private) static boolean |
validateConstraint(java.lang.String constraintName,
java.lang.String constraintText,
UUID constraintId,
TableDescriptor td,
LanguageConnectionContext lcc,
boolean isCheckConstraint,
boolean isInitiallyDeferred) |
Evaluate a check constraint or not null column constraint.
|
(package private) static void |
validateFKConstraint(Activation activation,
TransactionController tc,
DataDictionary dd,
ForeignKeyConstraintDescriptor fk,
ReferencedKeyConstraintDescriptor refcd,
ExecRow indexTemplateRow) |
Make sure that the foreign key constraint is valid
with the existing data in the target table.
|
executeConstantAction
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getSchemaDescriptorForCreate, lockTableForDDL, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges
dropConglomerate, dropConglomerate, dropConstraint, dropConstraint, dropConstraint, executeConglomReplacement, getConglomReplacementAction, recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull
protected java.lang.String constraintName
protected int constraintType
protected java.lang.String tableName
protected java.lang.String schemaName
protected UUID schemaId
protected IndexConstantAction indexAction
protected UUID constraintId
ConstraintConstantAction(java.lang.String constraintName, int constraintType, java.lang.String tableName, UUID tableId, java.lang.String schemaName, IndexConstantAction indexAction)
constraintName
- Constraint name.constraintType
- Constraint type.tableName
- Table name.tableId
- UUID of table.schemaName
- schema that table and constraint lives in.indexAction
- IndexConstantAction for constraint (if necessary)
RESOLVE - the next parameter should go away once we use UUIDs
(Generated constraint names will be based off of uuids)public int getConstraintType()
public java.lang.String getConstraintName()
public UUID getConstraintId()
public IndexConstantAction getIndexAction()
static void validateFKConstraint(Activation activation, TransactionController tc, DataDictionary dd, ForeignKeyConstraintDescriptor fk, ReferencedKeyConstraintDescriptor refcd, ExecRow indexTemplateRow) throws StandardException
tc
- transaction controllerdd
- data dictionaryfk
- foreign key constraintrefcd
- referenced keyindexTemplateRow
- index template rowStandardException
- on errorstatic boolean validateConstraint(java.lang.String constraintName, java.lang.String constraintText, UUID constraintId, TableDescriptor td, LanguageConnectionContext lcc, boolean isCheckConstraint, boolean isInitiallyDeferred) throws StandardException
constraintName
- constraint nameconstraintText
- constraint textconstraintId
- constraint idtd
- referenced tablelcc
- the language connection contextisCheckConstraint
- the constraint is a check constraintisInitiallyDeferred
- true
if the constraint is
initially deferredStandardException
- if check constraint failsApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.