MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / _check_ready

Method _check_ready

asyncpg/cursor.py:105–116  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

103 self._record_class = record_class
104
105 def _check_ready(self):
106 if self._state is None:
107 raise exceptions.InterfaceError(
108 'cursor: no associated prepared statement')
109
110 if self._state.closed:
111 raise exceptions.InterfaceError(
112 'cursor: the prepared statement is closed')
113
114 if not self._connection._top_xact:
115 raise exceptions.NoActiveSQLTransactionError(
116 'cursor cannot be created outside of a transaction')
117
118 async def _bind_exec(self, n, timeout):
119 self._check_ready()

Callers 8

_bind_execMethod · 0.95
_bindMethod · 0.95
_execMethod · 0.95
_close_portalMethod · 0.95
_initMethod · 0.80
fetchMethod · 0.80
fetchrowMethod · 0.80
forwardMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected