Attempting a Parse.Query with multiple constraints, using both OR and AND operations. For instance, executing an operation similar to this:
(x1 greater than 2 OR x2 less than 5) && (x3 equal to 4) && (x4 greater than 7 OR x5 less than 8)
In this scenario, the variables x1
, x2
, x3
represent specific field query constraints. While one can utilize Parse.Query.or by inputting two separate queries as parameters and then incorporating additional constraints after performing AND operations on the result like so:
var lotsOfWins = new Parse.Query("Player");
lotsOfWins.greaterThan(150);
var fewWins = new Parse.Query("Player");
fewWins.lessThan(5);
var mainQuery = Parse.Query.or(lotsOfWins, fewWins);
The question arises about how to handle the aforementioned operation when dealing with multiple "OR" conditions. Is there a method to directly set these constraints in MongoDB?