On Mon, Jun 22, 2009 at 6:44 PM, MajorProgamming<[email protected]> wrote:
>
> I need to perform a simple ordering query (descending rank) on my
> datastore. The default query looks like:
>
> query.order('-rank')
Take a look at the PagerQuery class. You would do:
previous, results, next =
PagerQuery(ModelClass).order('-rank').fetch(10, bookmark)
Here, previous and next are bookmarks for the previous and next
"pages", which you can use in subsequent queries (for the initial
query, bookmark=None).
Here it is:
http://bitbucket.org/moraes/appengine/src/tip/gaefy/db/pager.py
-- rodrigo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---