Class: Parse::Constraint::CompoundQueryConstraint
- Inherits:
- Parse::Constraint
- Object
- Parse::Constraint
- Parse::Constraint::CompoundQueryConstraint
- Defined in:
- lib/parse/query/constraints.rb
Overview
Equivalent to the `$or` Parse query operation. This is useful if you want to find objects that match several queries. We overload the `|` operator in order to have a clean syntax for joining these `or` operations.
or_query = query1 | query2 | query3
query = Player.where(:wins.gt => 150) | Player.where(:wins.lt => 5)
query.or_where :field => value
Instance Attribute Summary
Attributes inherited from Parse::Constraint
#operand, #operation, #operator, #value
Instance Method Summary collapse
- #build ⇒ Hash
The compiled constraint.
Methods inherited from Parse::Constraint
#as_json, contraint_keyword, create, #formatted_value, formatted_value, #initialize, #key, #precedence, register, #to_s
Constructor Details
This class inherits a constructor from Parse::Constraint