class RootTransaction(Transaction): (source)
Known subclasses: sqlalchemy.engine.base.TwoPhaseTransaction
Represent the "root" transaction on a :class:`_engine.Connection`. This corresponds to the current "BEGIN/COMMIT/ROLLBACK" that's occurring for the :class:`_engine.Connection`. The :class:`_engine.RootTransaction` is created by calling upon the :meth:`_engine.Connection.begin` method, and remains associated with the :class:`_engine.Connection` throughout its active span. The current :class:`_engine.RootTransaction` in use is accessible via the :attr:`_engine.Connection.get_transaction` method of :class:`_engine.Connection`. In :term:`2.0 style` use, the :class:`_engine.Connection` also employs "autobegin" behavior that will create a new :class:`_engine.RootTransaction` whenever a connection in a non-transactional state is used to emit commands on the DBAPI connection. The scope of the :class:`_engine.RootTransaction` in 2.0 style use can be controlled using the :meth:`_engine.Connection.commit` and :meth:`_engine.Connection.rollback` methods.
Method | __init__ |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Instance Variable | connection |
Undocumented |
Instance Variable | is |
Undocumented |
Method | _close |
Undocumented |
Method | _connection |
Undocumented |
Method | _connection |
Undocumented |
Method | _connection |
Undocumented |
Method | _deactivate |
Undocumented |
Method | _do |
Undocumented |
Method | _do |
Undocumented |
Method | _do |
Undocumented |
Class Variable | _is |
Undocumented |
Property | _deactivated |
True if this transaction is totally deactivated from the connection and therefore can no longer affect its state. |
Inherited from Transaction
:
Method | close |
Close this :class:`.Transaction`. |
Method | commit |
Commit this :class:`.Transaction`. |
Method | rollback |
Roll back this :class:`.Transaction`. |
Property | is |
Undocumented |
Method | _get |
Undocumented |
Method | _rollback |
indicates the object is in a state that is known to be acceptable for rollback() to be called. |
Method | _transaction |
Undocumented |
Method | _transaction |
Undocumented |
Inherited from TransactionalContext
(via Transaction
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Class Method | _trans |
Undocumented |
Instance Variable | _outer |
Undocumented |
Instance Variable | _trans |
Undocumented |