Class: Parse::Constraint::InQueryConstraint

Inherits:
Parse::Constraint show all
Defined in:
lib/parse/query/constraints.rb

Overview

Equivalent to the `$inQuery` Parse query operation. Useful if you want to retrieve objects where a field contains an object that matches another query.

q.where :field.matches => query
# assume Post class has an image column.
q.where :post.matches => Post.where(:image.exists => true )

Instance Attribute Summary

Attributes inherited from Parse::Constraint

#operand, #operation, #operator, #value

Instance Method Summary collapse

Methods inherited from Parse::Constraint

#as_json, #build, 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

#in_queryInQueryConstraint

Alias for #matches

Returns:


562
# File 'lib/parse/query/constraints.rb', line 562

contraint_keyword 

#matchesInQueryConstraint

A registered method on a symbol to create the constraint. Maps to Parse operator “$inQuery”.

Examples:

q.where :field.matches => query

Returns:

# File 'lib/parse/query/constraints.rb', line 553