def reversed(self):
"""Creates a cursor for use in a query with a reversed sort order."""
for pos in self.__compiled_cursor.position_list():
if pos.has_start_key():
raise datastore_errors.BadRequestError('Cursor cannot be reversed.')
rev_pb = datastore_pb.CompiledCursor()
rev_pb.CopyFrom(self.__compiled_cursor)
for pos in rev_pb.position_list():
pos.set_start_inclusive(not pos.start_inclusive())
return Cursor(_cursor_pb=rev_pb)
不,不保留此类信息。
.reversed()
调用只返回一个位置相反的新游标:(为了可读性,源代码缩进为4个空格)。你知道吗
相关问题 更多 >
编程相关推荐