Class: PgEventstore::QueryStrategy::Foreground
- Inherits:
-
Object
- Object
- PgEventstore::QueryStrategy::Foreground
- Defined in:
- lib/pg_eventstore/query_strategy/foreground.rb,
sig/pg_eventstore/query_strategy/foreground.rbs
Instance Method Summary collapse
- #exec(*exec_args) ⇒ Object
- #exec_params(*exec_args) ⇒ Object
-
#initialize(connection) ⇒ Foreground
constructor
A new instance of Foreground.
Constructor Details
#initialize(connection) ⇒ Foreground
Returns a new instance of Foreground.
8 9 10 |
# File 'lib/pg_eventstore/query_strategy/foreground.rb', line 8 def initialize(connection) @connection = connection end |
Instance Method Details
#exec(*exec_args) ⇒ Object
12 13 14 15 16 |
# File 'lib/pg_eventstore/query_strategy/foreground.rb', line 12 def exec(*exec_args) @connection.with do |conn| conn.exec(*exec_args) end end |
#exec_params(*exec_args) ⇒ Object
18 19 20 21 22 |
# File 'lib/pg_eventstore/query_strategy/foreground.rb', line 18 def exec_params(*exec_args) @connection.with do |conn| conn.exec_params(*exec_args) end end |