Skip to content

Add docs about Parse.Query.and() #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2017
Merged

Add docs about Parse.Query.and() #445

merged 1 commit into from
Nov 27, 2017

Conversation

gofabian
Copy link

Update according to parse-community/Parse-SDK-JS#367

Copy link
Contributor

@addisonElliott addisonElliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the wording needs to be altered a bit. Altogether, I like the commit because I wasn't aware of the Parse.Query.and function myself.

});
</code></pre>

Sometimes world is complexer than this simple example and you may need an compound query of sub queries. You can use `Parse.Query.and` method to construct a query that is an AND of the queries passed in. For instance if you want to find users in the age of 16 or 18 who have either no friends or at least 2 friends, you can do:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would switch complexer to more complex. I'm not entirely sure complexer is a word, but I could be wrong.

Additionally, I think the first and second sentence can be morphed together to explain that the simple query above may not be sufficient in all cases and Parse.Query.and solves the problem.

Here is an example of what this could look like:

For more complex queries, you can use the Parse.Query.and method to return a query that is an AND of the input queries. For instance if you want to find users at the age of 16 or 18 who have either no friends or at least 2 friends, you can do:

@addisonElliott
Copy link
Contributor

What's the status on this PR?

@natanrolnik
Copy link
Contributor

I don't have write access here. @flovilmart ?

@flovilmart
Copy link
Contributor

Should be good now!

@natanrolnik natanrolnik merged commit 9f23610 into parse-community:gh-pages Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants