Method: Parse::Query#where

Defined in:
lib/parse/query.rb

#where(conditions = nil, opts = {}) ⇒ self

Add additional query constraints to the where clause. The where clause is based on utilizing a set of constraints on the defined column names in your Parse classes. The constraints are implemented as method operators on field names that are tied to a value. Any symbol/string that is not one of the main expression keywords described here will be considered as a type of query constraint for the where clause in the query.

Examples:

# parts of a single where constraint
{ :column.constraint => value }

See Also:



559
560
561
562
563
564
565
566
567
# File 'lib/parse/query.rb', line 559

def where(conditions = nil, opts = {})
  return @where if conditions.nil?
  if conditions.is_a?(Hash)
    conditions.each do |operator, value|
      add_constraint(operator, value, opts)
    end
  end
  self #chaining
end