On web2py transactions, commit and rollback

[edit|delete]

In web2py, if you do multiple inserts/update/select in a controller function, web2py will commit all of them when the function returns unless there is an uncaught exception. In this case it will rollback all of them before issuing a ticket.

You have the option to

db.commit()

and

db.rollback()

anywhere you please.



Post a comment