abstract class Jennifer::View::Materialized

Overview

Base class for a database materialized view#Materialized_views).

The only difference from Base is one additional method .refresh which allows refreshing data of the view. Also this class usage makes sense only if you use PostgreSQL as only it has native support of materialized views.

Defined in:

jennifer/view/materialized.cr

Class Method Summary

Instance methods inherited from class Jennifer::View::Base

reload reload

Class methods inherited from class Jennifer::View::Base

build(values : Hash | NamedTuple, new_record : Bool)
build(pull : DB::ResultSet)
build
, i18n_scope i18n_scope, relation(name) relation, view_name(value : String)
view_name
view_name
, views views

Instance methods inherited from module Jennifer::Model::Mapping

attribute_metadata(name : String | Symbol) attribute_metadata

Instance methods inherited from class Jennifer::Model::Resource

append_relation(name : String, hash) append_relation, attribute(name : String | Symbol, raise_exception : Bool = true) attribute, get_relation(name : String) get_relation, inspect(io) : Nil inspect, primary primary, set_inverse_of(name : String, object) set_inverse_of, to_h to_h, to_json(only : Array(String)? = nil, except : Array(String)? = nil)
to_json(only : Array(String)? = nil, except : Array(String)? = nil, &)
to_json(json : JSON::Builder)
to_json(json : JSON::Builder, only : Array(String)? = nil, except : Array(String)? = nil, &)
to_json
, to_str_h to_str_h

Class methods inherited from class Jennifer::Model::Resource

adapter adapter, all all, build(values : Hash(Symbol, Jennifer::DBAny) | NamedTuple)
build(values : Hash(String, Jennifer::DBAny))
build(**values)
build
, c(name : String | Symbol, relation)
c(name : String | Symbol)
c
, context context, read_adapter read_adapter, relation(name) relation, star star, table_name(value : String | Symbol)
table_name : String
table_name
, transaction(&) transaction, where(&)
where(conditions : Hash(Symbol, _))
where
, write_adapter write_adapter

Instance methods inherited from module Jennifer::Model::RelationDefinition

append_relation(name : String, hash) append_relation, get_relation(name : String) get_relation, relation_retrieved(name : String) relation_retrieved, set_inverse_of(name : String, object) set_inverse_of

Instance methods inherited from module Jennifer::Model::Translation

class_name : String class_name, human_attribute_name(attribute : String | Symbol) human_attribute_name, lookup_ancestors(&) lookup_ancestors

Class Method Detail

def self.refresh #

Refresh materialized view data in th DB.


[View source]