class documentation

Apply Python context manager behavior to transaction objects. Performs validation to ensure the subject of the transaction is not used if the transaction were ended prematurely.

Method __enter__ Undocumented
Method __exit__ Undocumented
Method close Undocumented
Method commit Undocumented
Method rollback Undocumented
Class Variable __slots__ Undocumented
Class Method _trans_ctx_check 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
Instance Variable _outer_trans_ctx Undocumented
Instance Variable _trans_subject Undocumented
def __enter__(self) -> TransactionalContext: (source)

Undocumented

def __exit__(self, type_: Any, value: Any, traceback: Any): (source)

Undocumented

__slots__: tuple[str, ...] = (source)

Undocumented

@classmethod
def _trans_ctx_check(cls, subject: _TConsSubject): (source)

Undocumented

def _rollback_can_be_called(self) -> bool: (source)

indicates the object is in a state that is known to be acceptable for rollback() to be called. This does not necessarily mean rollback() will succeed or not raise an error, just that there is currently no state detected that indicates rollback() would fail or emit warnings. It also does not mean that there's a transaction in progress, as it is usually safe to call rollback() even if no transaction is present. .. versionadded:: 1.4.28

def _transaction_is_active(self) -> bool: (source)
def _transaction_is_closed(self) -> bool: (source)
_outer_trans_ctx = (source)

Undocumented

_trans_subject = (source)

Undocumented