Class: PgDice::QueryExecutorFactory

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pgdice/query_executor_factory.rb

Overview

QueryExecutorFactory is a class used to build QueryExecutors

Instance Method Summary collapse

Constructor Details

#initialize(configuration, opts = {}) ⇒ QueryExecutorFactory

Returns a new instance of QueryExecutorFactory.



11
12
13
14
# File 'lib/pgdice/query_executor_factory.rb', line 11

def initialize(configuration, opts = {})
  @configuration = configuration
  @connection_supplier = opts[:connection_supplier] ||= -> { pg_connection }
end

Instance Method Details

#callObject



16
17
18
# File 'lib/pgdice/query_executor_factory.rb', line 16

def call
  PgDice::QueryExecutor.new(logger: logger, connection_supplier: @connection_supplier)
end