web2py/web2py — pull request #230 by grutz (2013-09-26 09:35:00+00:00)
Title: Add _return_record to update_or_insert

From the web2py discussion @
https://groups.google.com/forum/#!topic/web2py/vjU9sYCoxU0 this
implements Anthony's suggestion to return the full record after a
successful update with update_or_insert.

To use pass '_return_record=True' before arguments.

The default action of returning None is retained.

In [3]: db.auth_user.update_or_insert(email='user')
Out[3]: 1L

In [4]: db.auth_user.update_or_insert(email='user')

In [5]: db.auth_user.update_or_insert(_return_record=True, email='user')
Out[5]: