Module: BBMB::Persistence::ODBA
- Defined in:
- lib/bbmb/persistence/odba.rb
Class Method Summary collapse
- .all(klass, &block) ⇒ Object
- .delete(*objs) ⇒ Object
- .migrate_to_subject ⇒ Object
- .save(*objs) ⇒ Object
Class Method Details
.all(klass, &block) ⇒ Object
17 18 19 |
# File 'lib/bbmb/persistence/odba.rb', line 17 def ODBA.all(klass, &block) klass.odba_extent(&block) end |
.delete(*objs) ⇒ Object
23 24 25 |
# File 'lib/bbmb/persistence/odba.rb', line 23 def ODBA.delete(*objs) objs.each { |obj| obj.odba_delete } end |
.migrate_to_subject ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/bbmb/persistence/odba.rb', line 26 def ODBA.migrate_to_subject all(Model::Product) { |product| product.migrate_to_subject && product.odba_store } all(Model::Order) { |order| order.each { |position| position.migrate_to_subject && position.odba_store } } ::ODBA.cache.create_deferred_indices(true) end |
.save(*objs) ⇒ Object
20 21 22 |
# File 'lib/bbmb/persistence/odba.rb', line 20 def ODBA.save(*objs) objs.each { |obj| obj.odba_store } end |