开发者

Creating Auto Incrementing column in Google Appengine

开发者 https://www.devze.com 2022-12-31 14:58 出处:网络
What is the easiest and most efficient way to create an auto-increment counter for every data row in google appengine?

What is the easiest and most efficient way to create an auto-increment counter for every data row in google appengine?

ba开发者_开发技巧sically 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

0

精彩评论

暂无评论...
验证码 换一张
取 消