what is the use case for updating the row object instead of the database? I sometimes use update() instead of update_record(), so I would prefer update() threw an exception.
Is it worth adding the equivalent delete_record()? On Nov 19, 10:43 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > you can do > > del db.table[row.id] > > Mind that > > row.update(...) > > only updates the row object, not the database record. > > row.update_record(...) > > updates the database record. > > On Nov 18, 5:22 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > > > A feature to delete the record from the current object would be nice, like > > the .update() method of the row, to have .delete() > > > row = db(db.table.id > 0).select().first() > > ... > > #do some other queries with row data > > ... > > row.delete() # i don't need row anymore, so purge it from database. > > > # I currently have to do > > > # db(db.table.id == row.id).delete() > > > -Thadeus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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 -~----------~----~----~----~------~----~------~--~---