class documentation

class TwoPhaseTransaction(RootTransaction):

View In Hierarchy

Represent a two-phase transaction.

A new .TwoPhaseTransaction object may be procured using the _engine.Connection.begin_twophase method.

The interface is the same as that of .Transaction with the addition of the prepare method.

Method __init__ Undocumented
Method ​_connection​_begin​_impl Undocumented
Method ​_connection​_commit​_impl Undocumented
Method ​_connection​_rollback​_impl Undocumented
Method prepare Prepare this .TwoPhaseTransaction.
Class Variable __slots__ Undocumented
Instance Variable ​_is​_prepared Undocumented
Instance Variable xid Undocumented

Inherited from RootTransaction:

Method ​_close​_impl Undocumented
Method ​_deactivate​_from​_connection Undocumented
Method ​_do​_close Undocumented
Method ​_do​_commit Undocumented
Method ​_do​_deactivate do whatever steps are necessary to set this transaction as "deactive", however leave this transaction object in place as far as the connection's state.
Method ​_do​_rollback Undocumented
Class Variable ​_is​_root Undocumented
Instance Variable connection Undocumented
Instance Variable is​_active 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 (via RootTransaction):

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
Method close Close this .Transaction.
Method commit Commit this .Transaction.
Method rollback Roll back this .Transaction.
Property is​_valid Undocumented

Inherited from TransactionalContext (via RootTransaction, Transaction):

Class Method ​_trans​_ctx​_check Undocumented
Method __enter__ Undocumented
Method __exit__ Undocumented
Instance Variable ​_outer​_trans​_ctx Undocumented
Instance Variable ​_trans​_subject Undocumented
def __init__(self, connection, xid):
def _connection_begin_impl(self):
def _connection_commit_impl(self):
def _connection_rollback_impl(self):
def prepare(self):

Prepare this .TwoPhaseTransaction.

After a PREPARE, the transaction can be committed.

__slots__: tuple[str, ...] =
_is_prepared: bool =

Undocumented

xid =

Undocumented