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)
| 648 | query, *args, column=column, timeout=timeout) |
| 649 | |
| 650 | async def fetchrow(self, query, *args, timeout=None, record_class=None): |
| 651 | """Run a query and return the first row. |
| 652 | |
| 653 | Pool performs this operation using one of its connections. Other than |
| 654 | that, it behaves identically to |
| 655 | :meth:`Connection.fetchrow() <asyncpg.connection.Connection.fetchrow>`. |
| 656 | |
| 657 | .. versionadded:: 0.10.0 |
| 658 | """ |
| 659 | async with self.acquire() as con: |
| 660 | return await con.fetchrow( |
| 661 | query, |
| 662 | *args, |
| 663 | timeout=timeout, |
| 664 | record_class=record_class |
| 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* |