Class: OnesnooperServer::Stores::MysqlStore
- Inherits:
-
OnesnooperServer::SqlStore
- Object
- OnesnooperServer::Store
- OnesnooperServer::SqlStore
- OnesnooperServer::Stores::MysqlStore
- Defined in:
- lib/onesnooper_server/stores/mysql_store.rb
Overview
MySQL-based store for production deployments with static table structure.
Constant Summary
Constants inherited from OnesnooperServer::SqlStore
OnesnooperServer::SqlStore::SQL_TABLE_NAME
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ MysqlStore
constructor
A new instance of MysqlStore.
Methods inherited from OnesnooperServer::SqlStore
Methods inherited from OnesnooperServer::Store
Constructor Details
#initialize(params = {}) ⇒ MysqlStore
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/onesnooper_server/stores/mysql_store.rb', line 5 def initialize(params = {}) super @db_conn = ::Sequel.connect( :adapter => 'mysql2', :database => params[:database], :user => params[:username], :password => params[:password], :host => params[:host], :port => params[:port], ) end |