-
Notifications
You must be signed in to change notification settings - Fork 130
Description
This is a result of the emulator being built
on the Cloud Datastore API for App Engine, which only distinguishes between
NOT_FINISHED or not. Since the more_results flag is a hint (see below),
the only safe response when the query is finished is
MORE_RESULTS_AFTER_LIMIT.
Something to note:
more_results is a best effort hint to the developer. In the case of the
emulator it is buggy that MORE_RESULTS_AFTER_LIMIT is returned even if
the query didn't reach the limit. However even in production, the query may
return MORE_RESULTS_AFTER_LIMIT even if there are no more results if the
server is unwilling to do the work to check for the next entity.
This is not the issue here but for posterity: in order to determine if you
should keep iterating through results the clients should only ever use
more_results == NOT_FINISHED aa loop condition.