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

Method fetchrow

asyncpg/cursor.py:287–301  ·  view source on GitHub ↗

r"""Return the next row. :param float timeout: Optional timeout value in seconds. :return: A :class:`Record` instance.

(self, *, timeout=None)

Source from the content-addressed store, hash-verified

285
286 @connresource.guarded
287 async def fetchrow(self, *, timeout=None):
288 r"""Return the next row.
289
290 :param float timeout: Optional timeout value in seconds.
291
292 :return: A :class:`Record` instance.
293 """
294 self._check_ready()
295 if self._exhausted:
296 return None
297 recs = await self._exec(1, timeout)
298 if len(recs) < 1:
299 self._exhausted = True
300 return None
301 return recs[0]
302
303 @connresource.guarded
304 async def forward(self, n, *, timeout=None) -> int:

Callers

nothing calls this directly

Calls 2

_check_readyMethod · 0.80
_execMethod · 0.80

Tested by

no test coverage detected