Class: PGTrunk::Operations::Views::CreateView
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/views/create_view.rb
Instance Method Summary
collapse
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
92
93
94
95
|
# File 'lib/pg_trunk/operations/views/create_view.rb', line 92
def invert
irreversible!("replace_existing: true") if replace_existing
DropView.new(**to_h)
end
|
#to_sql(_version) ⇒ Object
88
89
90
|
# File 'lib/pg_trunk/operations/views/create_view.rb', line 88
def to_sql(_version)
[create_view, *, register_view].join(" ")
end
|