From 43dd169d2d0121c82c990ccab49657efb8a1ee7d Mon Sep 17 00:00:00 2001 From: Addison Elliott Date: Wed, 9 Aug 2017 09:52:56 -0500 Subject: [PATCH 1/2] Remove skip/limit limit doc from Android Queries --- _includes/android/queries.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_includes/android/queries.md b/_includes/android/queries.md index eb9c75415..a19224c28 100644 --- a/_includes/android/queries.md +++ b/_includes/android/queries.md @@ -39,7 +39,7 @@ query.whereNotEqualTo("playerName", "Michael Yabuti"); query.whereGreaterThan("playerAge", 18); ``` -You can limit the number of results with `setLimit`. By default, results are limited to 100, but anything from 1 to 1000 is a valid limit: +You can limit the number of results with `setLimit`. By default, results are limited to 100. In the old Parse hosted backend, the maximum limit was 1,000, but Parse Server removed that constraint: ```java query.setLimit(10); // limit to at most 10 results @@ -61,7 +61,7 @@ query.getFirstInBackground(new GetCallback() { }); ``` -You can skip the first results with `setSkip`. This can be useful for pagination: +You can skip the first results with `setSkip`. In the old Parse hosted backend, the maximum skip value was 10,000, but Parse Server removed that constraint. This can be useful for pagination: ```java query.setSkip(10); // skip the first 10 results @@ -227,7 +227,7 @@ query.findInBackground(new FindCallback() { }); ``` -If you want to retrieve objects where a field contains a `ParseObject` that matches a different query, you can use `whereMatchesQuery`. Note that the default limit of 100 and maximum limit of 1000 apply to the inner query as well, so with large data sets you may need to construct queries carefully to get the desired behavior. In order to find comments for posts containing images, you can do: +If you want to retrieve objects where a field contains a `ParseObject` that matches a different query, you can use `whereMatchesQuery`. In order to find comments for posts containing images, you can do: ```java ParseQuery innerQuery = ParseQuery.getQuery("Post"); @@ -387,7 +387,7 @@ Query caching also works with ParseQuery helpers including `getFirst()` and `get ## Counting Objects -Caveat: Count queries are rate limited to a maximum of 160 requests per minute. They can also return inaccurate results for classes with more than 1,000 objects. Thus, it is preferable to architect your application to avoid this sort of count operation (by using counters, for example.) +Note: In the old Parse hosted backend, count queries were rate limited to a maximum of 160 requests per minute. They also returned inaccurate results for classes with more than 1,000 objects. But, Parse Server has removed both constraints and can count objects well above 1,000. If you just need to count how many objects match a query, but you do not need to retrieve all the objects that match, you can use `count` instead of `find`. For example, to count how many games have been played by a particular player: From 9064427b75f19bc735603196b7f0a80b488cfddf Mon Sep 17 00:00:00 2001 From: Addison Elliott Date: Wed, 16 Aug 2017 23:02:23 -0500 Subject: [PATCH 2/2] Register Application in Manifest for Android Getting Started Include documentation that the developer needs to register the custom `Application` class in `AndroidManifest.xml` to correctly initialize Parse. --- _includes/android/getting-started.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/_includes/android/getting-started.md b/_includes/android/getting-started.md index 77bfee19f..82899d6ab 100644 --- a/_includes/android/getting-started.md +++ b/_includes/android/getting-started.md @@ -64,3 +64,13 @@ public class App extends Application { } } ``` + + For either option, the custom `Application` class must be registered in `AndroidManifest.xml`: + ``` + + ... + + ``` +