You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I of course might be missing something, but I have 10 entities in my KIND. I run the following code:
var NUM_RESULTS_PER_PAGE = 5;
app.get('/getusers',function(req,res){varquery=datastore.createQuery('users').limit(NUM_RESULTS_PER_PAGE);if(req.query.nextPageCursor){query.start(req.query.nextPageCursor);}datastore.runQuery(query,function(err,entities,info){if(err){// Error handling omitted...return;}// Respond to the front end with the contacts and the cursoring token// from the query we just ran.varfrontEndResponse={contacts: entities};// Check if more results may exist.if(info.moreResults!==gcloud.datastore.NO_MORE_RESULTS){frontEndResponse.nextPageCursor=info.endCursor;}res.render('contacts',frontEndResponse);});});
I run the code, it gets the first 5 entities (1-5) and it returns MORE_RESULTS_AFTER_LIMIT. I then take the nextPageCursor and query again, it now gets the next 5 entities (6-10) and it returns MORE_RESULTS_AFTER_LIMIT. There are no more entities though, and I take the cursor from this response it now returns no entities since there are no more, but it still returns MORE_RESULTS_AFTER_LIMIT, but there are no more? I would expect to receive NO_MORE_RESULTS?
The text was updated successfully, but these errors were encountered:
Right now, the next_query is still returned even though there are no more results. I'll try to make sure to explicitly send an update when the emulator has better more_results support.
I of course might be missing something, but I have 10 entities in my KIND. I run the following code:
var NUM_RESULTS_PER_PAGE = 5;
I run the code, it gets the first 5 entities (1-5) and it returns
MORE_RESULTS_AFTER_LIMIT
. I then take the nextPageCursor and query again, it now gets the next 5 entities (6-10) and it returnsMORE_RESULTS_AFTER_LIMIT
. There are no more entities though, and I take the cursor from this response it now returns no entities since there are no more, but it still returnsMORE_RESULTS_AFTER_LIMIT
, but there are no more? I would expect to receiveNO_MORE_RESULTS
?The text was updated successfully, but these errors were encountered: