Run a query and return a value in the first row. Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.fetchval() `. .. versionadded:: 0.10.0
(self, query, *args, column=0, timeout=None)
| 751 | ) |
| 752 | |
| 753 | async def fetchval(self, query, *args, column=0, timeout=None): |
| 754 | """Run a query and return a value in the first row. |
| 755 | |
| 756 | Pool performs this operation using one of its connections. Other than |
| 757 | that, it behaves identically to |
| 758 | :meth:`Connection.fetchval() |
| 759 | <asyncpg.connection.Connection.fetchval>`. |
| 760 | |
| 761 | .. versionadded:: 0.10.0 |
| 762 | """ |
| 763 | async with self.acquire() as con: |
| 764 | return await con.fetchval( |
| 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. |
no test coverage detected