2010-10-05 17 views

risposta

11

Per ottenere il massimo che si utilizza GQL, si potrebbe fare questo:

max_x = db.GqlQuery("SELECT * FROM MyModel ORDER BY x DESC").get().x 

si potrebbe usare questo approccio sintatticamente più breve, ma equivalenti:

max_x = MyModel.all().order('-x').get().x