multiple row works like a charm

anand you and aaron nailed it with .3
Keep rocking :)

Anand Chitipothu wrote:
On Thu, May 1, 2008 at 7:31 AM, Paul Jobs <[EMAIL PROTECTED]> wrote:
  
 i ve read discussions before requesting for this feature in .23 but
 anand said it ll work in .3 well
 please share snippets of how to multiple row inserts in .3
    

I just added support for multiple_insert to web.py 0.3.

db = web.database(...)
db.multiple_insert('person', [{"name": "foo", "email":
"[EMAIL PROTECTED]"}, {"name": "bar", "email": "[EMAIL PROTECTED]"}])

It returns the list of ids of the inserted rows.
Set `seqname` to the ID if it's not the default, or to `False` if
there isn't one.

Sqlite does not support multiple row insert, so in this case
multiple_insert calls insert multiple times in a loop.


  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to