Module: AppQuery::Mappable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/app_query/mappable.rb
Overview
Maps query results to Ruby objects (e.g., Data classes, Structs).
By default, looks for an Item constant in the query class.
Use map_to to specify a different class.
Instance Method Summary collapse
Instance Method Details
#raw ⇒ Object
43 44 45 46 |
# File 'lib/app_query/mappable.rb', line 43 def raw @raw = true self end |
#select_all ⇒ Object
48 49 50 |
# File 'lib/app_query/mappable.rb', line 48 def select_all map_result(super) end |
#select_one ⇒ Object
52 53 54 |
# File 'lib/app_query/mappable.rb', line 52 def select_one map_one(super) end |