a first try is here:

    http://paste.pocoo.org/show/101774/

incomplete, as i'm stuck in the FIFO part. anyway, here is the basic
idea for the API:

    # get a bookmark - from GET or cookie.
    bookmark = self.request.get('bookmark')

    # build a query normally
    query = db.Query(Foo).filter('x >', 0).filter('x <', 9).order('-
x')

    # instead of fetch directly, we call a 'bookmark' method, to tell
the query that we want to
    # bookmark the result. we pass a bookmark if one was available, or
None, or nothing.
    res = query.bookmark(bookmark).fetch(10)

    # now we can get a bookmark from the query, to pass to query
strings or cookies
    bookmark = query.bookmarked

When a bookmark is not passed to the bookmark() method, it builds the
bookmarkable query normally. Otherwise, it also (tries to) create the
derived queries.

I'm stuck in the final part of the implementation. If anyone can take
a look and mess around with it, it will be nice. Right now I feel that
my head exploded.

:-)

-- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to