Class: PGTrunk::Operations::Statistics::CreateStatistics
- Inherits:
-
Base
show all
- Defined in:
- lib/pg_trunk/operations/statistics/create_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
146
147
148
149
|
# File 'lib/pg_trunk/operations/statistics/create_statistics.rb', line 146
def invert
irreversible!("if_not_exists: true") if if_not_exists
DropStatistics.new(**to_h)
end
|
#to_sql(version) ⇒ Object
140
141
142
143
144
|
# File 'lib/pg_trunk/operations/statistics/create_statistics.rb', line 140
def to_sql(version)
check_version!(version)
[create_statistics, *, register_object].join(" ")
end
|