推荐学习书目
› Python Cookbook 1
muxi 2010 年 5 月 2 日
big table 的ID是不连续的,这个应该是自己算好,然后存进去的
|
2
vvoody 2010 年 5 月 2 日
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。
|