class documentation

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_active Undocumented
Method _close_impl Undocumented
Method _connection_begin_impl Undocumented
Method _connection_commit_impl Undocumented
Method _connection_rollback_impl Undocumented
Method _deactivate_from_connection Undocumented
Method _do_close Undocumented
Method _do_commit Undocumented
Method _do_rollback Undocumented
Class Variable _is_root Undocumented
Property _deactivated_from_connection 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_valid Undocumented
Method _get_subject Undocumented
Method _rollback_can_be_called indicates the object is in a state that is known to be acceptable for rollback() to be called.
Method _transaction_is_active Undocumented
Method _transaction_is_closed Undocumented

Inherited from TransactionalContext (via Transaction):

Method __enter__ Undocumented
Method __exit__ Undocumented
Class Method _trans_ctx_check Undocumented
Instance Variable _outer_trans_ctx Undocumented
Instance Variable _trans_subject Undocumented
def _close_impl(self, try_deactivate: bool = False): (source)

Undocumented

def _connection_begin_impl(self): (source)

Undocumented

def _connection_commit_impl(self): (source)

Undocumented

def _connection_rollback_impl(self): (source)

Undocumented

def _deactivate_from_connection(self): (source)

Undocumented

def _do_close(self): (source)
def _do_commit(self): (source)
def _do_rollback(self): (source)
@property
_deactivated_from_connection: bool = (source)

True if this transaction is totally deactivated from the connection and therefore can no longer affect its state.