You can do a lock at the single entity (in practice the record) level. On Dec 2, 7:26 am, yamandu <yamandu.co...@gmail.com> wrote: > Thanks again Massimo, > > I think in my case it wont be such a big problem not to be transaction > safe. > But could be there any way I don´t see yet to do a lock. Right? > > On 2 dez, 00:40, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > You have to loop: > > > for row in db(db.table.id>0).select(): > > row.update_record(x=row.x+1) > > > It is going to be slow and not transaction safe. > > > On Dec 1, 3:11 pm, yamandu <yamandu.co...@gmail.com> wrote: > > > > Could anyone here throw some light on this subject? > > > I think GQL has no update statement and Web2py does not support > > > expressions. > > > So what´s thepropperwayto (batch) update records? > > > I mean in the case like that: > > > > db.define_table('tabela', > > > Field('x',integer) ) > > > > Suppose I want to increment the value in x for a set of records. > > > > Would db(db.tabela.id>0).update(x='x+10') work on GAE ? > >
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.