Class: Timescaledb::Scenic::Views
- Inherits:
-
Scenic::Adapters::Postgres::Views
- Object
- Scenic::Adapters::Postgres::Views
- Timescaledb::Scenic::Views
- Defined in:
- lib/timescaledb/scenic/adapter.rb
Instance Method Summary collapse
-
#all ⇒ Array<Scenic::View>
All of the views that this connection has defined, excluding any Timescale continuous aggregates.
Instance Method Details
#all ⇒ Array<Scenic::View>
All of the views that this connection has defined, excluding any Timescale continuous aggregates. Those should be defined using create_continuous_aggregate
rather than create_view
.
12 13 14 15 16 17 18 19 |
# File 'lib/timescaledb/scenic/adapter.rb', line 12 def all ts_views = views_from_timescale.map { |v| to_scenic_view(v) } pg_views = views_from_postgres.map { |v| to_scenic_view(v) } ts_view_names = ts_views.map(&:name) # Skip records with matching names (includes the schema name # for records not in the public schema) pg_views.reject { |v| v.name.in?(ts_view_names) } end |