Class: Dbsketch::Comparison::ComputedColumnDiff
- Defined in:
- lib/dbsketch/comparison/computed_column_comparator.rb
Instance Attribute Summary collapse
-
#nullable ⇒ Object
readonly
Returns the value of attribute nullable.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#persisted ⇒ Object
readonly
Returns the value of attribute persisted.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Attributes inherited from Diff
Instance Method Summary collapse
-
#initialize(old_column, new_column, options) ⇒ ComputedColumnDiff
constructor
A new instance of ComputedColumnDiff.
Methods inherited from Diff
#addition?, #change?, #deletion?
Constructor Details
#initialize(old_column, new_column, options) ⇒ ComputedColumnDiff
Returns a new instance of ComputedColumnDiff.
13 14 15 16 17 18 19 20 21 |
# File 'lib/dbsketch/comparison/computed_column_comparator.rb', line 13 def initialize old_column, new_column, super old_column, new_column if change? @query = Diff.new(old_column.query, new_column.query) if old_column.query != new_column.query @nullable = Diff.new(old_column.nullable, new_column.nullable) if old_column.nullable != new_column.nullable @order = Diff.new(old_column.order, new_column.order) if [:compare_order] and old_column.order != new_column.order @persisted = Diff.new(old_column.persisted, new_column.persisted) if old_column.persisted != new_column.persisted end end |
Instance Attribute Details
#nullable ⇒ Object (readonly)
Returns the value of attribute nullable.
23 24 25 |
# File 'lib/dbsketch/comparison/computed_column_comparator.rb', line 23 def nullable @nullable end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
23 24 25 |
# File 'lib/dbsketch/comparison/computed_column_comparator.rb', line 23 def order @order end |
#persisted ⇒ Object (readonly)
Returns the value of attribute persisted.
23 24 25 |
# File 'lib/dbsketch/comparison/computed_column_comparator.rb', line 23 def persisted @persisted end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
23 24 25 |
# File 'lib/dbsketch/comparison/computed_column_comparator.rb', line 23 def query @query end |