We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa98422 commit 0cf015cCopy full SHA for 0cf015c
lib/query_helper/sql_filter.rb
@@ -21,13 +21,15 @@ def create_filters
21
raise InvalidQueryError.new("cannot filter by #{comparate_alias}") unless map
22
23
# create the filter
24
- @filters << QueryHelper::Filter.new(
25
- operator_code: criteria.keys.first,
26
- criterion: criteria.values.first,
27
- comparate: map.sql_expression,
28
- aggregate: map.aggregate,
29
- qualify_clause: aggregated_attribute?(comparate: map.sql_expression)
30
- )
+ criteria.each do |k, v|
+ @filters << QueryHelper::Filter.new(
+ operator_code: k,
+ criterion: v,
+ comparate: map.sql_expression,
+ aggregate: map.aggregate,
+ qualify_clause: aggregated_attribute?(comparate: map.sql_expression)
31
+ )
32
+ end
33
end
34
35
0 commit comments