Sha256: bf9d7e6d778b665ac63ce0292f163e4d2f0bca6da7ccb4c7a7e817c267db9f09

Contents?: true

Size: 537 Bytes

Versions: 5

Compression:

Stored size: 537 Bytes

Contents

require_dependency "renalware/reporting"

module Renalware
  module Reporting
    class Audit < ApplicationRecord
      validates :name, presence: true
      validates :materialized_view_name, presence: true
      validates :refresh_schedule, presence: true

      def self.available_audit_materialized_views
        result = connection.execute("SELECT oid::regclass::text FROM pg_class
                                     WHERE  relkind = 'm' and relname like 'reporting_%';")
        result.values.flatten
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta8 app/models/renalware/reporting/audit.rb
renalware-core-2.0.0.pre.beta7 app/models/renalware/reporting/audit.rb
renalware-core-2.0.0.pre.beta6 app/models/renalware/reporting/audit.rb
renalware-core-2.0.0.pre.beta5 app/models/renalware/reporting/audit.rb
renalware-core-2.0.0.pre.beta4 app/models/renalware/reporting/audit.rb