Class: YeSQL::Query::Performer
- Inherits:
-
Object
- Object
- YeSQL::Query::Performer
- Includes:
- Bindings::Utils
- Defined in:
- lib/yesql/query/performer.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(bind_statement:, file_path:, bindings: {}, output: :rows, prepare: false) ⇒ Performer
constructor
A new instance of Performer.
Methods included from Bindings::Utils
Methods included from Utils::Read
Constructor Details
#initialize(bind_statement:, file_path:, bindings: {}, output: :rows, prepare: false) ⇒ Performer
Returns a new instance of Performer.
16 17 18 19 20 21 22 |
# File 'lib/yesql/query/performer.rb', line 16 def initialize(bind_statement:, file_path:, bindings: {}, output: :rows, prepare: false) @bind_statement = bind_statement @file_path = file_path @named_bindings = bindings.transform_keys(&:to_sym) @output = ::YeSQL::Params::Output.new(output) @prepare = prepare end |
Instance Method Details
#call ⇒ Object
24 25 26 |
# File 'lib/yesql/query/performer.rb', line 24 def call ::YeSQL::Query::TransformResult.new(output: output, result: query_result).call end |