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