Class: PGTrunk::Operations::Rules::CreateRule
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/rules/create_rule.rb
Instance Method Summary
collapse
Methods inherited from Base
#<=>
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
118
119
120
121
|
# File 'lib/pg_trunk/operations/rules/create_rule.rb', line 118
def invert
irreversible!("replace_existing: true") if replace_existing
DropRule.new(**to_h)
end
|
#to_sql(_server_version) ⇒ Object
114
115
116
|
# File 'lib/pg_trunk/operations/rules/create_rule.rb', line 114
def to_sql(_server_version)
[create_rule, *, register_rule].join(" ")
end
|