Module: Analytic::Utility::ClassMethods

Defined in:
app/models/analytic/utility.rb

Overview

Class-level methods mixed into the including class via ActiveSupport::Concern.

Instance Method Summary collapse

Instance Method Details

#execute(sql) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/models/analytic/utility.rb', line 10

def execute(sql)
  status = []
  begin
    ActiveRecord::Base.lease_connection.execute(sql)
  rescue StandardError => e
    status << "Fact Table could not be updated, message : #{e}"
  end
  status
end