(self, dbapi_connection: DBAPIConnection)
| 854 | return str(expression.select(1).compile(dialect=self)) |
| 855 | |
| 856 | def _do_ping_w_event(self, dbapi_connection: DBAPIConnection) -> bool: |
| 857 | try: |
| 858 | return self.do_ping(dbapi_connection) |
| 859 | except self.loaded_dbapi.Error as err: |
| 860 | is_disconnect = self.is_disconnect(err, dbapi_connection, None) |
| 861 | |
| 862 | if self._has_events: |
| 863 | try: |
| 864 | Connection._handle_dbapi_exception_noconnection( |
| 865 | err, |
| 866 | self, |
| 867 | is_disconnect=is_disconnect, |
| 868 | invalidate_pool_on_disconnect=False, |
| 869 | is_pre_ping=True, |
| 870 | ) |
| 871 | except exc.StatementError as new_err: |
| 872 | is_disconnect = new_err.connection_invalidated |
| 873 | |
| 874 | if is_disconnect: |
| 875 | return False |
| 876 | else: |
| 877 | raise |
| 878 | |
| 879 | def do_ping(self, dbapi_connection: DBAPIConnection) -> bool: |
| 880 | cursor = dbapi_connection.cursor() |
nothing calls this directly
no test coverage detected