Class: Parse::Constraint::InQueryConstraint

Inherits:
Constraint
  • Object
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 Method Summary collapse

Instance Method Details

#in_queryInQueryConstraint

Alias for #matches

Returns:



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

constraint_keyword :$inQuery

#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 1689