Class: Dynomite::Item::Query::Params::Function::Base
- Inherits:
-
Object
- Object
- Dynomite::Item::Query::Params::Function::Base
- Defined in:
- lib/dynomite/item/query/params/function/base.rb
Direct Known Subclasses
Constant Summary
Constants included from Types
Instance Method Summary collapse
- #attribute_values ⇒ Object
- #build_attribute_names_with_dot_paths(paths) ⇒ Object
-
#initialize(query) ⇒ Base
constructor
A new instance of Base.
Methods included from Types
Methods included from Helpers
#all_where_field_names, #all_where_fields, #disable_index_for_any_or?, #disable_index_for_consistent_read?, #disable_index_for_not?, #normalize_expression_path, #normalize_project_expression, #query, #scan_required?, #with_where_groups
Constructor Details
#initialize(query) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/dynomite/item/query/params/function/base.rb', line 6 def initialize(query) @query = query end |
Instance Method Details
#attribute_values ⇒ Object
28 29 30 |
# File 'lib/dynomite/item/query/params/function/base.rb', line 28 def attribute_values {} end |
#build_attribute_names_with_dot_paths(paths) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/dynomite/item/query/params/function/base.rb', line 10 def build_attribute_names_with_dot_paths(paths) attribute_names = {} paths.each do |path| fields = path.split('.') fields.each do |field| if field.starts_with?('#') key = field value = field[1..-1] else key = "##{field}" value = field end attribute_names[key] = value end end attribute_names end |