在Google Appengine中创建自动递增列 [英] Creating Auto Incrementing column in Google Appengine
问题描述
基本上我想给每一行一个唯一的唯一的行row_number,这样我就可以解决只能在选择查询中获得前1000个结果的问题。因此,我可以在状态和我的表中的所有状态之间添加一个计数器。
您不需要跟踪行号,您可以使用游标。
对于Java请参阅:
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors
对于Python,请参阅:
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Query_Cursors
What is the easiest and most efficient way to create an auto-increment counter for every data row in google appengine?
basically I want to give every row a unique row_number so that I can overcome the issue of only being able to get the first 1000 results in a select query. I can thus add a counter lies between condition and mine all the entires in the table.
You don't need to keep track of row numbers, you can use cursors instead.
For Java see:
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors
For Python see:
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Query_Cursors
这篇关于在Google Appengine中创建自动递增列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!