class documentation

class TwoPhaseTransaction(RootTransaction): (source)

View In Hierarchy

Represent a two-phase transaction. A new :class:`.TwoPhaseTransaction` object may be procured using the :meth:`_engine.Connection.begin_twophase` method. The interface is the same as that of :class:`.Transaction` with the addition of the :meth:`prepare` method.

Method __init__ Undocumented
Method prepare Prepare this :class:`.TwoPhaseTransaction`.
Class Variable __slots__ Undocumented
Instance Variable xid Undocumented
Method _connection_begin_impl Undocumented
Method _connection_commit_impl Undocumented
Method _connection_rollback_impl Undocumented
Instance Variable _is_prepared Undocumented

Inherited from RootTransaction:

Instance Variable connection Undocumented
Instance Variable is_active Undocumented
Method _close_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 (via RootTransaction):

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 RootTransaction, 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 __init__(self, connection: Connection, xid: Any): (source)
def prepare(self): (source)

Prepare this :class:`.TwoPhaseTransaction`. After a PREPARE, the transaction can be committed.

Undocumented

def _connection_begin_impl(self): (source)
def _connection_commit_impl(self): (source)
def _connection_rollback_impl(self): (source)
_is_prepared: bool = (source)

Undocumented