Class: PGTrunk::Operations::Functions::CreateFunction
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/functions/create_function.rb
Instance Method Summary
collapse
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
145
146
147
148
|
# File 'lib/pg_trunk/operations/functions/create_function.rb', line 145
def invert
irreversible!("replace_existing: true") if replace_existing
DropFunction.new(**to_h)
end
|
#to_sql(version) ⇒ Object
137
138
139
140
141
142
143
|
# File 'lib/pg_trunk/operations/functions/create_function.rb', line 137
def to_sql(version)
[
create_function,
*,
register_function(version),
].join(" ")
end
|