Thanks Zheng and Nick!
On May 19, 3:41 pm, "Nick Johnson (Google)"
wrote:
> Hi Daiski,
>
> You can sort your results by using the .order() method on a Query object:
>
> q = Student.all().order('last_name').
>
> The datastore only supports fetching 1000 results per query. If you
> really need to
Hi Daiski,
You can sort your results by using the .order() method on a Query object:
q = Student.all().order('last_name').
The datastore only supports fetching 1000 results per query. If you
really need to retrieve more, you can use multiple queries and
paginate, for example see Zheng's solutio
The problem is not about sorting. The problem is that you cannot get
more than 1000 entries.
You need to "paginate" on the last_name property (if it is guaranteed
to be unique).
all_students = [ ]
next = ''
while True:
students = Student.all().order('last_name').filter('last_name >',
next).fe