Class: Dbsketch::Comparison::CheckConstraintDiff

Inherits:
Diff
  • Object
show all
Defined in:
lib/dbsketch/comparison/check_constraint_comparator.rb

Instance Attribute Summary

Attributes inherited from Diff

#new_value, #old_value

Instance Method Summary collapse

Methods inherited from Diff

#addition?, #change?, #deletion?

Constructor Details

#initialize(old_constraint, new_constraint) ⇒ CheckConstraintDiff



13
14
15
# File 'lib/dbsketch/comparison/check_constraint_comparator.rb', line 13

def initialize old_constraint, new_constraint
  super old_constraint, new_constraint
end

Instance Method Details

#conditionObject

Raises:



19
20
21
22
23
24
# File 'lib/dbsketch/comparison/check_constraint_comparator.rb', line 19

def condition
  ### Preconditions

  raise ComparisonError, "no change found" if not change?
  ###

  Diff.new old_constraint.condition, new_constraint.condition
end