Sha256: ff9f1447e60d01f8f676be16df8b5714f719bb42e797bd7186a67135851a9802
Contents?: true
Size: 389 Bytes
Versions: 6
Compression:
Stored size: 389 Bytes
Contents
require 'sequel' module SandthornDriverSequel class SequelDriver def initialize(args = {}) Sequel.default_timezone = :utc @db = args.fetch(:connection) { Sequel.connect(args.fetch(:url)) } end def execute yield @db end def execute_in_transaction &block @db.transaction do block.call(@db) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems