Class: PGTrunk::Operations::Procedures::RenameProcedure
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/procedures/rename_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
44
45
46
47
|
# File 'lib/pg_trunk/operations/procedures/rename_procedure.rb', line 44
def invert
q_new_name = "#{new_name.schema}.#{new_name.routine}(#{name.args}) #{name.returns}"
self.class.new(**to_h, name: q_new_name.strip, to: name)
end
|
#to_sql(version) ⇒ Object
38
39
40
41
42
|
# File 'lib/pg_trunk/operations/procedures/rename_procedure.rb', line 38
def to_sql(version)
check_version!(version)
[*change_schema, *change_name].join("; ")
end
|