>> Is there a way to do executemany() semantic updates? Suppose I have a list >> of employee id's and I want to do something like: >> >> ids = [1, 2, 3, 4, 5, 6] >> session.execute( tbl_employees.update(tbl_employees.c.id == ids), >> tbl_employees.c.status="you're fired" ) > >Just us the in_ syntax > >session.execute( tbl_employees.update(tbl_employees.c.id.in_(ids)), >status="you're fired" )
Thanks. The actually list would have a couple thousand items, so I think in_ would generate a huge query string. I'm having a tough time understanding how to do executemany style operations. I need to do them for insert and deleting too. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---