1

不确定这是我遇到的错误还是一些概念上的误解。我想要做的基本上是按照此处文档中的概述设置上一个和下一个分页游标,除了我希望查询是投影查询。这可能吗?例如:

# Set up.
q = Bar.query()
q_forward = q.order(Bar.key)
q_reverse = q.order(-Bar.key)

# Fetch a page going forward.
bars, cursor, more = q_forward.fetch_page(10, start_cursor=initial_cursor, projection=my_projection)

# Fetch the same page going backward.
rev_cursor = cursor.reversed()
bars1, cursor1, more1 = q_reverse.fetch_page(10, start_cursor=rev_cursor, projection=my_projection)

当我做这样的事情时,我会BadRequestError: Cursor does not match query运行第二个fetch_page(反向光标上的那个)。

4

0 回答 0