MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / do_ping

Method do_ping

lib/sqlalchemy/engine/default.py:879–885  ·  view source on GitHub ↗
(self, dbapi_connection: DBAPIConnection)

Source from the content-addressed store, hash-verified

877 raise
878
879 def do_ping(self, dbapi_connection: DBAPIConnection) -> bool:
880 cursor = dbapi_connection.cursor()
881 try:
882 cursor.execute(self._dialect_specific_select_one)
883 finally:
884 cursor.close()
885 return True
886
887 def create_xid(self):
888 """Create a random two-phase transaction ID.

Callers 1

_do_ping_w_eventMethod · 0.95

Calls 3

cursorMethod · 0.45
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected