Thanks for the quick reply. I'm not having any luck with update_or_insert, but insert and update work fine individually. I'm using keyed tables, so that may be why.
On Friday, July 7, 2017 at 11:40:55 AM UTC-7, Anthony wrote: > > On Friday, July 7, 2017 at 2:27:52 PM UTC-4, ad...@swcacloud.com > <javascript:> wrote: >> >> >> We can insert and update from a dictionary, but its not possible to do >> the same with "update_or_insert"? Is there a simple way to achieve that, >> or would it require changes to that dal function? >> >> >> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Inserting-and-updating-from-a-dictionary >> > > The above is a feature of the Python language itself -- you can use that > syntax to pass arguments to any function or method in Python, including > .update_or_insert(). The book provides examples for .insert() and .update() > just as a hint for those that might not be aware of this possibility, but a > lack of such examples for other methods and functions should not be taken > to imply that it is not possible. > > Anthony > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.