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
-~----------~----~----~----~------~----~------~--~---

Reply via email to