filter_by_scopes()
click to toggle source
def filter_by_scopes
scope_by_from
scope_by_values
scope_by_extended_query
scope_by_inclusive_filters
scope_by_with_all
scope_by_exclusive_filters
scope_by_without_all
scope_by_order
scope_by_group
scope_by_pagination
scope_by_options
end
method_missing(*args, &block)
click to toggle source
def method_missing(*args, &block)
report.send *args, &block
end
scope_by_exclusive_filters()
click to toggle source
def scope_by_exclusive_filters
query.where_not exclusive_filters if exclusive_filters.any?
end
scope_by_extended_query()
click to toggle source
def scope_by_extended_query
query.matching extended_query if extended_query.present?
end
scope_by_from()
click to toggle source
def scope_by_from
query.from *(index_names.collect { |index| "`#{index}`" })
end
scope_by_group()
click to toggle source
def scope_by_group
query.group_by group_attribute if group_attribute.present?
query.order_within_group_by group_order_clause if group_order_clause.present?
end
scope_by_inclusive_filters()
click to toggle source
def scope_by_inclusive_filters
query.where inclusive_filters if inclusive_filters.any?
end
scope_by_options()
click to toggle source
def scope_by_options
query.with_options select_options if select_options.keys.any?
end
scope_by_order()
click to toggle source
def scope_by_order
query.order_by order_clause if order_clause.present?
end
scope_by_values()
click to toggle source
def scope_by_values
query.values values if values.present?
end
scope_by_with_all()
click to toggle source
def scope_by_with_all
query.where_all options[:with_all] if options[:with_all]
end
scope_by_without_all()
click to toggle source
def scope_by_without_all
query.where_not_all options[:without_all] if options[:without_all]
end