Run a query and return the first row. Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.fetchrow() `. .. versionadded:: 0.10.0
(self, query, *args, timeout=None, record_class=None)
| 765 | query, *args, column=column, timeout=timeout) |
| 766 | |
| 767 | async def fetchrow(self, query, *args, timeout=None, record_class=None): |
| 768 | """Run a query and return the first row. |
| 769 | |
| 770 | Pool performs this operation using one of its connections. Other than |
| 771 | that, it behaves identically to |
| 772 | :meth:`Connection.fetchrow() <asyncpg.connection.Connection.fetchrow>`. |
| 773 | |
| 774 | .. versionadded:: 0.10.0 |
| 775 | """ |
| 776 | async with self.acquire() as con: |
| 777 | return await con.fetchrow( |
| 778 | query, |
| 779 | *args, |
| 780 | timeout=timeout, |
| 781 | record_class=record_class |
| 782 | ) |
| 783 | |
| 784 | async def fetchmany(self, query, args, *, timeout=None, record_class=None): |
| 785 | """Run a query for each sequence of arguments in *args* |