Log Message: |
DERBY-532 Support deferrable constraints
Patch derby-532-syntax-binding-dict-all-1. This patch wires in the syntax
for deferred constraints (aka "constraint characteristics"). It also
does
- binding checks for CREATE TABLE constraints and SET constraints
statement (new). Binding is still missing for ALTER TABLE
constraints clauses.
- temporarily throws not yet implemented (0A000.S) for all usage
*except* when characteristics coincide with the current (and future)
Derby defaults, i.e. NOT DEFERRABLE [INITIALLY IMMEDIATE] ENFORCED
- checks inconsistencies in characteristics (illegal combinations), cf.
42X97 "Conflicting constraint characteristics for constraint"
- implements implied DEFERRABLE of (only) INITIALLY DEFERRED is
specified.
- if the property "derby.constraintsTesting" is set, persists
characteristics to dictionary by overloading the existing STATE
character according to specification. This property will go away
once the feature set is implemented, only implemented not to be able
to test dictionary persistence
- throws 42XAK "Constraint characteristics not allowed for NOT NULL."
for NOT NULL characteristics since this constraint type is not
explicitly implemented as a constraint in Derby (yet, at least)
- adds a new test, ConstraintCharacteristicsTest to test the above and
wires it into the lang suite.
(part 2):
- Elaborates ALTER TABLE ALTER TABLE, correcting syntax, adding name
binding and updating dictionary (subject to the property
derby.constraintsTesting) in a new AlterConstraintConstantAction
class.
- Built out tests in ConstraintCharacteristicsTest to systematically
check all possible characteristics combinations in all cases, and
adding tests for ALTER TABLE ALTER TABLE, including dictionary
updates.
|