Class: PgDice::QueryExecutorFactory
- Inherits:
-
Object
- Object
- PgDice::QueryExecutorFactory
- Extended by:
- Forwardable
- Defined in:
- lib/pgdice/query_executor_factory.rb
Overview
QueryExecutorFactory is a class used to build QueryExecutors
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, opts = {}) ⇒ QueryExecutorFactory
constructor
A new instance of QueryExecutorFactory.
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
#call ⇒ Object
16 17 18 |
# File 'lib/pgdice/query_executor_factory.rb', line 16 def call PgDice::QueryExecutor.new(logger: logger, connection_supplier: @connection_supplier) end |