Sha256: 36cc757a2d5f44615bd1a03c08e9ed75ea60a3d37bd5f78a05dc85bdb59ce2fd
Contents?: true
Size: 720 Bytes
Versions: 1
Compression:
Stored size: 720 Bytes
Contents
module JDBC class Gateway def initialize(connection_pool:) @connection_pool = connection_pool end def command(sql, bindings = {}) connection_pool.with_connection do |connection| Command.new(connection: connection, sql: sql, bindings: bindings).run end end def ddl(sql, bindings = {}) connection_pool.with_connection do |connection| DDL.new(connection: connection, sql: sql, bindings: bindings).run end end def query(sql, bindings = {}) connection_pool.with_connection do |connection| Query.new(connection: connection, sql: sql, bindings: bindings).run end end private attr_reader :connection_pool end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jdbc-0.1.0-jruby | lib/jdbc/gateway.rb |