class TransactionalContext(object):
Known subclasses: sqlalchemy.engine.base.Transaction
, sqlalchemy.orm.session.SessionTransaction
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.
Class Method | _trans_ctx_check |
Undocumented |
Method | __enter__ |
Undocumented |
Method | __exit__ |
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 |
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.