Sha256: 94daffae0cd7d2df4af9b3cb75b48ba7b27ae38a5a4ab13446325cb13245afc4

Contents?: true

Size: 499 Bytes

Versions: 1

Compression:

Stored size: 499 Bytes

Contents

module Timescale
  class ContinuousAggregate < ActiveRecord::Base
    self.table_name = "timescaledb_information.continuous_aggregates"
    self.primary_key = 'materialization_hypertable_name'

    has_many :jobs, foreign_key: "hypertable_name",
      class_name: "Timescale::Job"

    has_many :chunks, foreign_key: "hypertable_name",
      class_name: "Timescale::Chunk"

    scope :resume, -> do
      {
        total: count
      }
    end
  end
  ContinuousAggregates = ContinuousAggregate
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timescaledb-0.1.5 lib/timescale/continuous_aggregates.rb