
1 muxi May 2, 2010 big table 的ID是不连续的,这个应该是自己算好,然后存进去的 |
2 vvoody May 2, 2010 from google.appengine.ext import db class Accumulator(db.Model): counter = db.IntegerProperty() def increment_counter(key, amount): obj = db.get(key) obj.counter += amount obj.put() q = db.GqlQuery("SELECT * FROM Accumulator") acc = q.get() db.run_in_transaction(increment_counter, acc.key(), 5) 可以自己这么维护一个counter |
4 Livid MOD PRO 嗯,确实是自己维护一组 counter。 |