Re: [sqlalchemy] updating with a Session ?

2013-02-06 Thread Simon King
On Wed, Feb 6, 2013 at 2:05 AM, Jonathan Vanasco jonat...@findmeon.com wrote: I use SqlAlchemy in a Pyramid app. All my models, connections, etc are within and set up by Pyramid. I'm trying to do a maintenance script, and am a bit confused. In my script, thanks to a bootstraped commandline

Re: [sqlalchemy] updating with a Session ?

2013-02-06 Thread Wichert Akkerman
On Feb 6, 2013, at 03:05 , Jonathan Vanasco jonat...@findmeon.com wrote: I use SqlAlchemy in a Pyramid app. All my models, connections, etc are within and set up by Pyramid. I'm trying to do a maintenance script, and am a bit confused. In my script, thanks to a bootstraped commandline

Re: [sqlalchemy] updating with a Session ?

2013-02-06 Thread Simon King
On Wed, Feb 6, 2013 at 11:19 AM, Simon King si...@simonking.org.uk wrote: On Wed, Feb 6, 2013 at 2:05 AM, Jonathan Vanasco jonat...@findmeon.com wrote: I use SqlAlchemy in a Pyramid app. All my models, connections, etc are within and set up by Pyramid. I'm trying to do a maintenance

[sqlalchemy] Re: updating with a Session ?

2013-02-06 Thread Jonathan Vanasco
ah ha! thanks!!! these two approaches worked: results = api.bootstrapped.request.dbSession.writer.execute( model.core.Useraccount.__table__\ .update()\ .where( model.core.Useraccount.id.in_( uids ) )\ .values( migration_a = True )