class Fabrique::Test::Fixtures::Repository::MysqlStore

Public Class Methods

new(host: 'localhost', port: 3306, username: nil, password: nil) click to toggle source
# File lib/fabrique/test/fixtures/repository.rb, line 77
def initialize(host: 'localhost', port: 3306, username: nil, password: nil)
  @connection = MysqlConnection.new(host, port, username, password)
end

Public Instance Methods

find(table, id) click to toggle source
# File lib/fabrique/test/fixtures/repository.rb, line 81
def find(table, id)
  @connection.find(table, "WHERE customer_id = ?", [id])
end
save(table, record) click to toggle source
# File lib/fabrique/test/fixtures/repository.rb, line 94
def save(table, record)
  @connection.update_or_insert(table, record)
end