Module: Hold::Sequel::RepositoryObserver

Defined in:
lib/hold/sequel/repository_observer.rb

Overview

If you want to observe events on a Hold::Sequel::IdentitySetRepository you need to implement this interface. Stubs supplied here to save you some boilerplate in case you only care about certain events.

The callback methods correspond to their counterparts on Hold::Sequel::IdentityHashRepository but with an added argument passing the repository instance.

TODO: generalise this to SetRepositories in general

Instance Method Summary collapse

Instance Method Details

#post_delete(_repo, _entity) ⇒ Object



28
29
# File 'lib/hold/sequel/repository_observer.rb', line 28

def post_delete(_repo, _entity)
end

#post_insert(_repo, _entity, _insert_rows, _insert_id) ⇒ Object



16
17
# File 'lib/hold/sequel/repository_observer.rb', line 16

def post_insert(_repo, _entity, _insert_rows, _insert_id)
end

#post_update(_repo, _entity, _update_entity, _update_rows) ⇒ Object



22
23
# File 'lib/hold/sequel/repository_observer.rb', line 22

def post_update(_repo, _entity, _update_entity, _update_rows)
end

#pre_delete(_repo, _entity) ⇒ Object



25
26
# File 'lib/hold/sequel/repository_observer.rb', line 25

def pre_delete(_repo, _entity)
end

#pre_insert(_repo, _entity) ⇒ Object



13
14
# File 'lib/hold/sequel/repository_observer.rb', line 13

def pre_insert(_repo, _entity)
end

#pre_update(_repo, _entity, _update_entity) ⇒ Object



19
20
# File 'lib/hold/sequel/repository_observer.rb', line 19

def pre_update(_repo, _entity, _update_entity)
end