Class: Parse::Constraint::RelationQueryConstraint
- Inherits:
- Parse::Constraint
- Object
- Parse::Constraint
- Parse::Constraint::RelationQueryConstraint
- Defined in:
- lib/parse/query/constraints.rb
Overview
Instance Attribute Summary
Attributes inherited from Parse::Constraint
#operand, #operation, #operator, #value
Instance Method Summary collapse
- #build ⇒ Hash
The compiled constraint.
- #rel ⇒ RelationQueryConstraint
Alias for #related_to.
- #related_to ⇒ RelationQueryConstraint
A registered method on a symbol to create the 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
Instance Method Details
#build ⇒ Hash
Returns the compiled constraint.
532 533 534 535 536 537 538 | # File 'lib/parse/query/constraints.rb', line 532 def build # pointer = formatted_value # unless pointer.is_a?(Parse::Pointer) # raise "Invalid Parse::Pointer passed to :related(#{@operation.operand}) constraint : #{pointer}" # end { :$relatedTo => { object: formatted_value, key: @operation.operand } } end |
#rel ⇒ RelationQueryConstraint
Alias for #related_to
527 | # File 'lib/parse/query/constraints.rb', line 527 contraint_keyword :$relatedTo |
#related_to ⇒ RelationQueryConstraint
A registered method on a symbol to create the constraint. Maps to Parse operator “$relatedTo”.
# File 'lib/parse/query/constraints.rb', line 518
|