On 09/26/2016 09:25 PM, Mark Sandan wrote:
Hi,
  I was wondering if there exists a dialect-wide way to query whether
the underlying database is in a transaction mode that requires an
autocommit or not. In Teradata, there is this notion of a transaction
mode. When a session in Teradata is in a certain transaction mode
(TDBS), autocommits are used (the COMMIT is implicit). Alternatively,
when in ANSI mode, a COMMIT must explicitly be specified for the end of
a transaction (or ROLLBACK or ABORT). I'm wondering if it would be
useful to have something like below in the Dialect interface:

SQLAlchemy's support for "autocommit" at the DBAPI level is via the set_isolation_level() method which internally will set a DBAPI level conn.autocommit flag if that's how the DBAPI needs it to happen. It is only supported by Postgresql and MySQL. But none of these "require" autocommit, it's a flag the user can set, so I'm not sure what you're asking.


|
defconn_supports_autocommit(self,connection,**kw):
   """
   returns true if the current underlying database session autocommits
else false
   """
|

Or if there is already something that effectively does this.

Thanks!

--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

--
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 https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to