Class: Timescaledb::Scenic::Adapter

Inherits:
Scenic::Adapters::Postgres
  • Object
show all
Defined in:
lib/timescaledb/scenic/adapter.rb

Instance Method Summary collapse

Instance Method Details

#viewsObject

Timescale does some funky stuff under the hood with continuous aggregates. A continuous aggregate is made up of:

  1. A hypertable to store the materialized data

  2. An entry in the jobs table to refresh the data

  3. A view definition that union’s the hypertable and any recent data not included in the hypertable

That doesn’t dump well, even to structure.sql (we lose the job definition, since it’s not part of the DDL).

Our schema dumper implementation will handle dumping the continuous aggregate definitions, but we need to override Scenic’s schema dumping to exclude those continuous aggregates.



50
51
52
# File 'lib/timescaledb/scenic/adapter.rb', line 50

def views
  Views.new(connection).all
end