Update Nov2017
UPDATE:  parse.com as now been closed and moved to parseplatform.org. I will update the content of this page an move the back-end to this platform

The first problem we hit is the 1000 object limit on parse queries.

Here’s how to get round it using jQuery promises.

How it works

Parse allows only 1000 results max per query, but it does allow you to skip. This means that you can make multiple queries, skipping those already retrieved until you have them all. However, since the query is Async, it makes it a little tricky. However jQuery promises are a simple way to deal with asynce complexity.
  • Here we want to retrieve all rows with the scheme name “dulux”. We simply initialize Parse with our credentials, create a new Parse class called “ColorTable”, and wait for the promise returned by the function “schemePromise” to be either resolved or rejected
  • schemePromise calls findChunk, passing any results so far returned. When the promise returned by findChunk is resolved, it calls itself if there are still more results to be returned.
  • findChunk does a parse.com query, returning up to 1000 objects, concatentates the results to others so far received, and lets schemePromise know whether there are any more to get through the arguments to its promise resolution.

This model will work well for any retrieval needs from Parse.com for this project by simply generalizing the query constraints.

There is another problem though:

error getting scheme {“code”:154,”message”:”Skips larger than 10000 are not allowed”}
Which means that we’ll need yet another workaround if there are more than 10000 rows in the table.
For more on parse.com see Parse.com
For help and more information join our forum, follow the blog, follow me on twitter