Module: Schron::Archive::Interface
- Included in:
- Schron::Archive, IdentityMapRepository, Repository, Repository::Interface
- Defined in:
- lib/schron/archive/interface.rb
Instance Method Summary collapse
- #dump(object) ⇒ Object
- #dump_all(objects) ⇒ Object
- #first(&block) ⇒ Object
- #get(id) ⇒ Object
- #identity(object) ⇒ Object
- #insert(object) ⇒ Object
- #load(attributes) ⇒ Object
- #load_all(attributes) ⇒ Object
- #multi_get(ids) ⇒ Object
- #multi_insert(objects) ⇒ Object
- #query(&block) ⇒ Object
Instance Method Details
#dump(object) ⇒ Object
33 34 35 |
# File 'lib/schron/archive/interface.rb', line 33 def dump(object) raise NotImplementedError end |
#dump_all(objects) ⇒ Object
37 38 39 |
# File 'lib/schron/archive/interface.rb', line 37 def dump_all(objects) objects.map { |o| dump(o) } end |
#first(&block) ⇒ Object
9 10 11 |
# File 'lib/schron/archive/interface.rb', line 9 def first(&block) raise NotImplementedError end |
#get(id) ⇒ Object
13 14 15 |
# File 'lib/schron/archive/interface.rb', line 13 def get(id) raise NotImplementedError end |
#identity(object) ⇒ Object
45 46 47 |
# File 'lib/schron/archive/interface.rb', line 45 def identity(object) object.__send__ :id end |
#insert(object) ⇒ Object
21 22 23 |
# File 'lib/schron/archive/interface.rb', line 21 def insert(object) raise NotImplementedError end |
#load(attributes) ⇒ Object
29 30 31 |
# File 'lib/schron/archive/interface.rb', line 29 def load(attributes) raise NotImplementedError end |
#load_all(attributes) ⇒ Object
41 42 43 |
# File 'lib/schron/archive/interface.rb', line 41 def load_all(attributes) attributes.map { |a| load(a) } end |
#multi_get(ids) ⇒ Object
17 18 19 |
# File 'lib/schron/archive/interface.rb', line 17 def multi_get(ids) raise NotImplementedError end |
#multi_insert(objects) ⇒ Object
25 26 27 |
# File 'lib/schron/archive/interface.rb', line 25 def multi_insert(objects) raise NotImplementedError end |
#query(&block) ⇒ Object
5 6 7 |
# File 'lib/schron/archive/interface.rb', line 5 def query(&block) raise NotImplementedError end |