On Feb 11, 2011, at 3:05 PM, Romy wrote:

> On Feb 11, 9:13 am, Michael Bayer <[email protected]> wrote:
>> autocommit=True means every SELECT statement as well as every flush() uses 
>> its own transaction, that begins as the method is called, and is immediately 
>> closed, within the scope of the method call on your end.   begin() *only* 
>> works when autocommit=True, and only affects the way SQLAlchemy pulls 
>> connections from the connection pool.    DBAPI has no "begin", the 
>> connection itself is always in a transaction as soon as statements are 
>> emitted, unless commit() or rollback() is called.
> 
> In the entire time I've been running autocommit=True (on myISAM), I've
> never seen SELECTs get their own transaction in the log output, while
> every UPDATE/INSERT does. Is there something wrong w/ the log output ?

again, as far as the DBAPI is concerned, everything is "in a transaction", the 
myISAM tables just ignore it.    The COMMIT is emitted by SQLalchemy if the 
statement within the autocommit execution was a DML (CRUD) statement.  See 
http://www.sqlalchemy.org/docs/core/connections.html#understanding-autocommit 
(I'd recommend reading the whole page as well as 
http://www.sqlalchemy.org/docs/orm/session.html)


> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" 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/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en.

Reply via email to