Class: YeSQL::Query::Result
- Inherits:
-
Object
- Object
- YeSQL::Query::Result
- Extended by:
- Forwardable
- Includes:
- Common::Adapter
- Defined in:
- lib/yesql/query/result.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(bind_statement:, file_path:, prepare:, binds: []) ⇒ Result
constructor
A new instance of Result.
Methods included from Common::Adapter
Constructor Details
#initialize(bind_statement:, file_path:, prepare:, binds: []) ⇒ Result
Returns a new instance of Result.
14 15 16 17 18 19 |
# File 'lib/yesql/query/result.rb', line 14 def initialize(bind_statement:, file_path:, prepare:, binds: []) @binds = binds @bind_statement = bind_statement @file_path = file_path @prepare_option = prepare end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 |
# File 'lib/yesql/query/result.rb', line 21 def call return view_result if view? return rails5_result if ::ActiveRecord::VERSION::MAJOR == 5 && mysql? exec_query(bound, file_path, binds, prepare: prepare_option) end |