MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _unwrap

Method _unwrap

asyncpg/connection.py:1721–1730  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1719 self._loop.call_soon(cb.cb, con_ref, pid, channel, payload)
1720
1721 def _unwrap(self):
1722 if self._proxy is None:
1723 con_ref = self
1724 else:
1725 # `_proxy` is not None when the connection is a member
1726 # of a connection pool. Which means that the user is working
1727 # with a `PoolConnectionProxy` instance, and expects to see it
1728 # (and not the actual Connection) in their event callbacks.
1729 con_ref = self._proxy
1730 return con_ref
1731
1732 def get_reset_query(self):
1733 """Return the query sent to server on connection release.

Callers 3

_process_log_messageMethod · 0.95
_process_notificationMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected