class Spectacles::MaterializedView

Public Class Methods

materialized_view_exists?() click to toggle source
# File lib/spectacles/materialized_view.rb, line 9
def self.materialized_view_exists?
  self.connection.materialized_view_exists?(self.view_name)
end
Also aliased as: table_exists?
new(*) click to toggle source
# File lib/spectacles/materialized_view.rb, line 5
def self.new(*)
  raise NotImplementedError, "#{self} is an abstract class and cannot be instantiated."
end
refresh!(concurrently: false) click to toggle source
# File lib/spectacles/materialized_view.rb, line 13
def self.refresh!(concurrently: false)
  if concurrently
    self.connection.refresh_materialized_view_concurrently(self.view_name)
  else
    self.connection.refresh_materialized_view(self.view_name)
  end
end
refresh_concurrently!() click to toggle source
# File lib/spectacles/materialized_view.rb, line 21
def self.refresh_concurrently!
  refresh!(concurrently: true)
end
table_exists?()

Public Instance Methods

==(comparison_object) click to toggle source
Calls superclass method
# File lib/spectacles/materialized_view.rb, line 30
def ==(comparison_object)
  super ||
    comparison_object.instance_of?(self.class) &&
    attributes.present? &&
    comparison_object.attributes == attributes
end
persisted?() click to toggle source
# File lib/spectacles/materialized_view.rb, line 37
def persisted?
  false
end
readonly?() click to toggle source
# File lib/spectacles/materialized_view.rb, line 41
def readonly?
  true
end