MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __close

Method __close

lib/sqlalchemy/pool/base.py:876–884  ·  view source on GitHub ↗
(self, *, terminate: bool = False)

Source from the content-addressed store, hash-verified

874 )
875
876 def __close(self, *, terminate: bool = False) -> None:
877 self.finalize_callback.clear()
878 if self.__pool.dispatch.close:
879 self.__pool.dispatch.close(self.dbapi_connection, self)
880 assert self.dbapi_connection is not None
881 self.__pool._close_connection(
882 self.dbapi_connection, terminate=terminate
883 )
884 self.dbapi_connection = None
885
886 def __connect(self) -> None:
887 pool = self.__pool

Callers 3

closeMethod · 0.95
invalidateMethod · 0.95
get_connectionMethod · 0.95

Calls 3

_close_connectionMethod · 0.80
clearMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected