class NoBrainer::Criteria::Where::IndexFinder::IndexStrategy
Public Instance Methods
ast()
click to toggle source
# File lib/no_brainer/criteria/where.rb, line 376 def ast MultiOperator.new(criteria_ast.op, criteria_ast.clauses - optimized_clauses) end
rql_proc()
click to toggle source
# File lib/no_brainer/criteria/where.rb, line 380 def rql_proc lambda do |rql| return RethinkDB::RQL.new.expr([]) if rql_op == :get_all && rql_args.empty? opt = (rql_options || {}).merge(:index => index.aliased_name) r = rql.__send__(rql_op, *rql_args, opt) r = r.map { |i| i['doc'] } if rql_op == :get_nearest r = r.distinct if index.multi && !index_finder.criteria.options[:without_distinct] r end end