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

Method call_con_method

asyncpg/pool.py:61–70  ·  view source on GitHub ↗
(self: Any, *args: Any, **kwargs: Any)

Source from the content-addressed store, hash-verified

59 meth_name: str, iscoroutine: bool
60 ) -> Callable[..., Any]:
61 def call_con_method(self: Any, *args: Any, **kwargs: Any) -> Any:
62 # This method will be owned by PoolConnectionProxy class.
63 if self._con is None:
64 raise exceptions.InterfaceError(
65 'cannot call Connection.{}(): '
66 'connection has been released back to the pool'.format(
67 meth_name))
68
69 meth = getattr(self._con.__class__, meth_name)
70 return meth(self._con, *args, **kwargs)
71
72 if iscoroutine:
73 compat.markcoroutinefunction(call_con_method)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected