Class: OnesnooperServer::Stores::SqliteStore

Inherits:
OnesnooperServer::SqlStore show all
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

Methods inherited from OnesnooperServer::SqlStore

#save!

Methods inherited from OnesnooperServer::Store

#save!

Constructor Details

#initialize(params = {}) ⇒ 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