| Modifier and Type | Field and Description |
|---|---|
| protected UUID | |
| protected String | |
| protected int | |
| protected IndexConstantAction | |
| protected UUID | |
| protected String | |
| protected String |
| Access | Constructor and Description |
|---|---|
| pack-priv | ConstraintConstantAction(String
Constraint name. constraintName, int Constraint type. constraintType, String Table name. tableName, UUID UUID of table. tableId, String schema that table and constraint lives in. schemaName, IndexConstantAction 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) indexAction)Make one of these puppies. |
| Modifier and Type | Method and Description |
|---|---|
| public UUID | |
| public String | |
| public int | |
| public IndexConstantAction | Returns: the constant action for the backing indexGet the associated index constant action. |
| pack-priv static boolean | Returns: true if null constraint passes, false otherwiseconstraint name constraintName, String constraint text constraintText, UUID constraint id constraintId, TableDescriptor referenced table td, LanguageConnectionContext the language connection context lcc, boolean the constraint is a check constraint isCheckConstraint, boolean true if the constraint is
initially deferredEvaluate a check constraint or not null column constraint. |
| pack-priv static void | validateFKConstraint(Activation activation, TransactionController
transaction controller tc, DataDictionary data dictionary dd, ForeignKeyConstraintDescriptor foreign key constraint fk, ReferencedKeyConstraintDescriptor referenced key refcd, ExecRow index template row indexTemplateRow)Make sure that the foreign key constraint is valid with the existing data in the target table. |
| constraintId | back to summary |
|---|---|
| protected UUID constraintId | |
| constraintName | back to summary |
|---|---|
| protected String constraintName | |
| constraintType | back to summary |
|---|---|
| protected int constraintType | |
| indexAction | back to summary |
|---|---|
| protected IndexConstantAction indexAction | |
| schemaId | back to summary |
|---|---|
| protected UUID schemaId | |
| schemaName | back to summary |
|---|---|
| protected String schemaName | |
| tableName | back to summary |
|---|---|
| protected String tableName | |
| ConstraintConstantAction | back to summary |
|---|---|
| pack-priv ConstraintConstantAction(String constraintName, int constraintType, String tableName, UUID tableId, String schemaName, IndexConstantAction indexAction) Make one of these puppies.
| |
| getConstraintId | back to summary |
|---|---|
| public UUID getConstraintId() Get the constraint id of the constraint
| |
| getConstraintName | back to summary |
|---|---|
| public String getConstraintName() Get the constraint name
| |
| getConstraintType | back to summary |
|---|---|
| public int getConstraintType() Get the constraint type.
| |
| getIndexAction | back to summary |
|---|---|
| public IndexConstantAction getIndexAction() Get the associated index constant action.
| |
| validateConstraint | back to summary |
|---|---|
| pack-priv static boolean validateConstraint(String constraintName, String constraintText, UUID constraintId, TableDescriptor td, LanguageConnectionContext lcc, boolean isCheckConstraint, boolean isInitiallyDeferred) throws StandardException Evaluate a check constraint or not null column constraint.
Generate a query of the
form SELECT COUNT(*) FROM t where NOT( constraint name
constraint text
constraint id
referenced table
the language connection context
the constraint is a check constraint
true if null constraint passes, false otherwise
| |
| validateFKConstraint | back to summary |
|---|---|
| pack-priv static void validateFKConstraint(Activation activation, TransactionController tc, DataDictionary dd, ForeignKeyConstraintDescriptor fk, ReferencedKeyConstraintDescriptor refcd, ExecRow indexTemplateRow) throws StandardException Make sure that the foreign key constraint is valid with the existing data in the target table. Open the table, if there aren't any rows, ok. If there are rows, open a scan on the referenced key with table locking at level 2. Pass in the scans to the BulkRIChecker. If any rows fail, barf.
| |