Enhancement request - provide break clause in queryTask.executeForCount

Discussion created by stevel on May 9, 2011
The queryTask method executeForCount returns the number of features which satisfy the query. This can take a long time to run when many features are returned (even when the returnGeometry option is set to false).

Could we have a new "break" option, so that the query stops when a minimum number of features has been found?

For example, say I want to know if there are more than 100 features returned by the query. If the query returns 10,000 features I need to wait until it has finished before I can evaluate the result. I'd like the option for the executeForCount method to break as soon as it finds 100 features.


PS I also added this on the Ideas page at so please vote for this if you like the idea