Class: PGTrunk::Operations::Procedures::DropProcedure
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/procedures/drop_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
72
73
74
75
|
# File 'lib/pg_trunk/operations/procedures/drop_procedure.rb', line 72
def invert
irreversible!("if_exists: true") if if_exists
CreateProcedure.new(**to_h)
end
|
#to_sql(version) ⇒ Object
64
65
66
67
68
69
70
|
# File 'lib/pg_trunk/operations/procedures/drop_procedure.rb', line 64
def to_sql(version)
check_version!(version)
sql = "DROP PROCEDURE"
sql << " IF EXISTS" if if_exists
sql << " #{name.to_sql};"
end
|