MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / engine_disposed

Method engine_disposed

lib/sqlalchemy/engine/events.py:495–511  ·  view source on GitHub ↗

Intercept when the :meth:`_engine.Engine.dispose` method is called. The :meth:`_engine.Engine.dispose` method instructs the engine to "dispose" of it's connection pool (e.g. :class:`_pool.Pool`), and replaces it with a new one. Disposing of the old pool has the effe

(self, engine: Engine)

Source from the content-addressed store, hash-verified

493 """
494
495 def engine_disposed(self, engine: Engine) -> None:
496 """Intercept when the :meth:`_engine.Engine.dispose` method is called.
497
498 The :meth:`_engine.Engine.dispose` method instructs the engine to
499 "dispose" of it's connection pool (e.g. :class:`_pool.Pool`), and
500 replaces it with a new one. Disposing of the old pool has the
501 effect that existing checked-in connections are closed. The new
502 pool does not establish any new connections until it is first used.
503
504 This event can be used to indicate that resources related to the
505 :class:`_engine.Engine` should also be cleaned up,
506 keeping in mind that the
507 :class:`_engine.Engine`
508 can still be used for new requests in which case
509 it re-acquires connection resources.
510
511 """
512
513 def begin(self, conn: Connection) -> None:
514 """Intercept begin() events.

Callers 1

disposeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected