On Mar 2, 2011, at 5:33 PM, Romy wrote:

> On Mar 2, 6:50 am, Michael Bayer <mike...@zzzcomputing.com> wrote:
>>> WRT your 5 insert example, what's wrong w/ explicitly marking those
>>> single logical units inside a BEGIN ... COMMIT while running
>>> autocommit ?
>> 
>> If they are truly unrelated things, then yes there's nothing logically wrong 
>> with them being in separate transactions.
>> [snip]
>> Then there's just the basic nature of what using a transaction means.   Your 
>> third operation fails, the request throws an error.  What ever you changed 
>> in the first two operations succeeds and remains permanent.   A lot of apps 
>> are not OK with that, certainly not any I write.
> 
> I think you misunderstood what I meant. I was referring to wrapping
> multiple statements in a single BEGIN / COMMIT, when necessary while
> running autocommit.

oh - well yes, the "real" use case for "autocommit" is that your application or 
framework is doing its own begin() and a rollback()/commit() at the end.  
"autocommit=True" allows the begin() to be denoted by the framework instead of 
upon first usage by the Session.



-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to