Class: PGTrunk::Operations::MaterializedViews::RefreshMaterializedView

Inherits:
Base show all
Defined in:
lib/pg_trunk/operations/materialized_views/refresh_materialized_view.rb

Instance Method Summary collapse

Methods inherited from Base

#column

Methods included from PGTrunk::Operation::SQLHelpers

#quote

Methods included from PGTrunk::Operation::RubyHelpers

#dump, #to_a, #to_opts, #to_ruby

Methods included from PGTrunk::Operation::Inversion

#invert!, #irreversible!

Methods included from PGTrunk::Operation::Validations

#error_messages

Methods included from PGTrunk::Operation::Attributes

#attributes, #initialize

Instance Method Details

#invertObject

The operation is reversible but its inversion does nothing



51
# File 'lib/pg_trunk/operations/materialized_views/refresh_materialized_view.rb', line 51

def invert; end

#to_sql(_version) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/pg_trunk/operations/materialized_views/refresh_materialized_view.rb', line 42

def to_sql(_version)
  sql = "REFRESH MATERIALIZED VIEW"
  sql << " CONCURRENTLY" if algorithm == :concurrently
  sql << " #{name.to_sql}"
  sql << " WITH NO DATA" if with_data == false
  sql << ";"
end