1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 1. 原本方式 articles=Article.all(keys_only=True).order("__key__").fetch(10) # 2. 使用cursor articles=[] q=Article.all(keys_only=True).order("__key__") articles+=q.fetch(5) cursor=q.cursor() q2=Article.all(keys_only=True) q2.with_cursor(cursor) articles+=qq.fetch(5) for k in articles: print k.name() |
Direct link: https://paste.plurk.com/show/171482