Class: GreyscaleRecord::DataStore::Engine
- Inherits:
-
Object
- Object
- GreyscaleRecord::DataStore::Engine
- Defined in:
- lib/greyscale_record/data_store/engine.rb
Instance Method Summary collapse
- #add_index(name, column) ⇒ Object
- #add_table(name) ⇒ Object
-
#find(options = {}) ⇒ Object
Read only store.
-
#initialize(driver) ⇒ Engine
constructor
A new instance of Engine.
Constructor Details
Instance Method Details
#add_index(name, column) ⇒ Object
51 52 53 |
# File 'lib/greyscale_record/data_store/engine.rb', line 51 def add_index( name, column ) store.table( name ).add_index( column ) end |
#add_table(name) ⇒ Object
47 48 49 |
# File 'lib/greyscale_record/data_store/engine.rb', line 47 def add_table( name ) load_table! name end |
#find(options = {}) ⇒ Object
Read only store. No writes allowed.
37 38 39 40 41 42 43 44 45 |
# File 'lib/greyscale_record/data_store/engine.rb', line 37 def find( = {} ) table = store.table( .delete(:_table) ) if GreyscaleRecord.live_reload load_table!( table.name ) end # TODO: this is where all the meat is table.find end |