Class: EntitySnapshot::Postgres::ReadOnly

Inherits:
Object
  • Object
show all
Includes:
EntityCache::Store::External, Get, Log::Dependency
Defined in:
lib/entity_snapshot/postgres/read_only.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Get

#entity_class, #get, prepended

Instance Attribute Details

#sessionObject

Returns the value of attribute session.



11
12
13
# File 'lib/entity_snapshot/postgres/read_only.rb', line 11

def session
  @session
end

Class Method Details

.assure(store) ⇒ Object



25
26
27
28
29
# File 'lib/entity_snapshot/postgres/read_only.rb', line 25

def self.assure(store)
  if store.snapshot_class.nil?
    raise EntityCache::Store::External::Error
  end
end

Instance Method Details

#categoryObject



13
14
15
# File 'lib/entity_snapshot/postgres/read_only.rb', line 13

def category
  StreamName.category(entity_class, specifier)
end

#configure(session: nil) ⇒ Object



17
18
19
20
# File 'lib/entity_snapshot/postgres/read_only.rb', line 17

def configure(session: nil)
  MessageStore::Postgres::Session.configure(self, session: session)
  MessageStore::Postgres::Get::Stream::Last.configure(self, session: self.session, attr_name: :read)
end

#putObject



22
23
# File 'lib/entity_snapshot/postgres/read_only.rb', line 22

def put(*)
end