Class: OnesnooperServer::Stores::SqliteStore
- Inherits:
-
OnesnooperServer::SqlStore
- Object
- OnesnooperServer::Store
- OnesnooperServer::SqlStore
- OnesnooperServer::Stores::SqliteStore
- Defined in:
- lib/onesnooper_server/stores/sqlite_store.rb
Overview
Sqlite3-based store for testing and small deployments.
Constant Summary
Constants inherited from OnesnooperServer::SqlStore
OnesnooperServer::SqlStore::SQL_TABLE_NAME
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ SqliteStore
constructor
A new instance of SqliteStore.
Methods inherited from OnesnooperServer::SqlStore
Methods inherited from OnesnooperServer::Store
Constructor Details
#initialize(params = {}) ⇒ SqliteStore
Returns a new instance of SqliteStore.
4 5 6 7 8 |
# File 'lib/onesnooper_server/stores/sqlite_store.rb', line 4 def initialize(params = {}) super @db_path = "sqlite://#{params[:database_file]}" @db_conn = ::Sequel.connect(@db_path) end |