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

Method call_con_method

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

Source from the content-addressed store, hash-verified

77 meth_name: str, iscoroutine: bool
78 ) -> Callable[..., Any]:
79 def call_con_method(self: Any, *args: Any, **kwargs: Any) -> Any:
80 # This method will be owned by PoolConnectionProxy class.
81 if self._con is None:
82 raise exceptions.InterfaceError(
83 'cannot call Connection.{}(): '
84 'connection has been released back to the pool'.format(
85 meth_name))
86
87 meth = getattr(self._con.__class__, meth_name)
88 return meth(self._con, *args, **kwargs)
89
90 if iscoroutine:
91 compat.markcoroutinefunction(call_con_method)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected