Stephen Cagle

Menu

  • Home
  • Archives
  • About Me
  • RSS
December 21, 2017

Pagination on Google App Engine Standard

Datastore (Google App Engine) does not let you lock the database. So how do you map across every element in Datastore? Here is a very rough and tumble solution to that problem.

Usage

Assume you have a ndb.Model named Widget

Begin pagination using the following (note that Widget is case sensitive)

curl https://example-domain.appspot.com/paginate/Widget
# => {'keys': [<URLSAFEKEYS>], 'cursor': <CURSOR_VALUE>}`.

Use <CURSOR_VALUE> to continue pagination across all Widget's

curl https://example-domain.appspot.com/paginate/Widget/<CURSOR_VALUE>

Code


« Build a CSV in Clojure Random crazy »

Copyright © 2020 Stephen Cagle