/[Apache-SVN]
ViewVC logotype

Revision 1517823


Jump to revision: Previous Next
Author: dag
Date: Tue Aug 27 14:05:03 2013 UTC (10 years, 8 months ago)
Changed paths: 28
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.

Changed paths

Path Details
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/CheckConstraintDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptorList.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ForeignKeyConstraintDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/KeyConstraintDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/ReferencedKeyConstraintDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/TriggerDescriptor.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SYSCONSTRAINTSRowFactory.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ConstraintDefinitionNode.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/SetConstraintsNode.java added
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementList.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/TableElementNode.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterConstraintConstantAction.java added
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/CreateConstraintConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/DropConstraintConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/GenericConstantActionFactory.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/SetConstraintsConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/UpdatableVTIConstantAction.java modified , text changed
Directorydb/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml modified , text changed
Directorydb/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/db2Compatibility.out modified , text changed
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ConstraintCharacteristicsTest.java added
Directorydb/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java modified , text changed
Directorydb/derby/code/trunk/tools/ide/netbeans/nbproject/project.xml modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26