Created
April 26, 2012 15:39
-
-
Save vseventer/2500449 to your computer and use it in GitHub Desktop.
Building a query.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query1 = new Kinvey.Query(); | |
query1.on('_geoloc').nearSphere([-97, 30], 100);// max 100 miles from Austin? | |
var query2 = new Kinvey.Query(); | |
query2.on('_geoloc').nearSphere([-71, 42], 100);// max 100 miles from Boston? | |
var query3 = new Kinvey.Query(); | |
query3.on('population').greaterThan(500000);// large city? | |
// Join all queries, result is saved in query1. | |
query1.or(query2).and(query3);// OR first, because of operator precedence. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment