MCPcopy
hub / github.com/MagicStack/asyncpg / fetchmany

Method fetchmany

asyncpg/pool.py:667–681  ·  view source on GitHub ↗

Run a query for each sequence of arguments in *args* and return the results as a list of :class:`Record`. Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.fetchmany() <asyncpg.connection.

(self, query, args, *, timeout=None, record_class=None)

Source from the content-addressed store, hash-verified

665 )
666
667 async def fetchmany(self, query, args, *, timeout=None, record_class=None):
668 """Run a query for each sequence of arguments in *args*
669 and return the results as a list of :class:`Record`.
670
671 Pool performs this operation using one of its connections. Other than
672 that, it behaves identically to
673 :meth:`Connection.fetchmany()
674 <asyncpg.connection.Connection.fetchmany>`.
675
676 .. versionadded:: 0.30.0
677 """
678 async with self.acquire() as con:
679 return await con.fetchmany(
680 query, args, timeout=timeout, record_class=record_class
681 )
682
683 async def copy_from_table(
684 self,

Callers 2

Calls 1

acquireMethod · 0.95

Tested by 2