On Mar 27, 2014, at 6:50 PM, Michael Bayer <[email protected]> wrote:

> 
> 
> if you really have to turn on this non-standard feature on, it needs to be 
> across the board for that particular engine, and would be like this:
> 
> from sqlalchemy import event
> 
> @event.listens_for(engine, "connect")
> def conn(conn, rec):
>     conn.autocommit(True)


correction, if you want it per connection, then like this:

conn = engine.connect()
conn.connection.autocommit(True)

conn.execute(<whatever>)

conn.connection.autocommit(False)


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to