Class: EventDb::MemoryDatabase
- Defined in:
- lib/eventdb/database.rb
Overview
convenience class for in-memory (SQLite3) database
Instance Method Summary collapse
-
#initialize ⇒ MemoryDatabase
constructor
A new instance of MemoryDatabase.
Methods inherited from Database
#add, #connect, #create, #create_all, #read
Constructor Details
#initialize ⇒ MemoryDatabase
Returns a new instance of MemoryDatabase.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/eventdb/database.rb', line 58 def initialize ## -- default to sqlite3 in-memory database super( adapter: 'sqlite3', database: ':memory:' ) ## step 1) (auto-)connect connect ## step 2) (auto-)migrate, that is, create tables, etc. create_all # -- incl. props, logs tables etc. end |