Class: PGTrunk::Operations::Procedures::CreateProcedure
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/procedures/create_procedure.rb
Instance Method Summary
collapse
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
113
114
115
116
|
# File 'lib/pg_trunk/operations/procedures/create_procedure.rb', line 113
def invert
irreversible!("replace_existing: true") if replace_existing
DropProcedure.new(**to_h)
end
|
#to_sql(version) ⇒ Object
106
107
108
109
110
111
|
# File 'lib/pg_trunk/operations/procedures/create_procedure.rb', line 106
def to_sql(version)
check_version!(version)
[create_proc, *, register_proc].join(" ")
end
|