Class: PGTrunk::Operations::Statistics::RenameStatistics
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/statistics/rename_statistics.rb
Instance Method Summary
collapse
Methods inherited from Base
#column, #expression
#quote
#dump, #to_a, #to_opts, #to_ruby
#invert!, #irreversible!
#error_messages
#attributes, #initialize
Instance Method Details
#invert ⇒ Object
33
34
35
36
|
# File 'lib/pg_trunk/operations/statistics/rename_statistics.rb', line 33
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
29
30
31
|
# File 'lib/pg_trunk/operations/statistics/rename_statistics.rb', line 29
def to_sql(_version)
[*change_schema, *change_name].join("; ")
end
|