Creating Auto Incrementing column 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
精彩评论