class documentation

class PoolResetState: (source)

View In Hierarchy

describes the state of a DBAPI connection as it is being passed to the :meth:`.PoolEvents.reset` connection pool event. .. versionadded:: 2.0.0b3

Class Variable __slots__ Undocumented
Class Variable asyncio_safe Indicates if the reset operation is occurring within a scope where an enclosing event loop is expected to be present for asyncio applications.
Class Variable terminate_only indicates if the connection is to be immediately terminated and not checked in to the pool.
Class Variable transaction_was_reset Indicates if the transaction on the DBAPI connection was already essentially "reset" back by the :class:`.Connection` object.
__slots__: tuple[str, ...] = (source)

Undocumented

asyncio_safe: bool = (source)

Indicates if the reset operation is occurring within a scope where an enclosing event loop is expected to be present for asyncio applications. Will be False in the case that the connection is being garbage collected.

terminate_only: bool = (source)

indicates if the connection is to be immediately terminated and not checked in to the pool. This occurs for connections that were invalidated, as well as asyncio connections that were not cleanly handled by the calling code that are instead being garbage collected. In the latter case, operations can't be safely run on asyncio connections within garbage collection as there is not necessarily an event loop present.

transaction_was_reset: bool = (source)

Indicates if the transaction on the DBAPI connection was already essentially "reset" back by the :class:`.Connection` object. This boolean is True if the :class:`.Connection` had transactional state present upon it, which was then not closed using the :meth:`.Connection.rollback` or :meth:`.Connection.commit` method; instead, the transaction was closed inline within the :meth:`.Connection.close` method so is guaranteed to remain non-present when this event is reached.