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)
| 634 | ) |
| 635 | |
| 636 | async def fetchval(self, query, *args, column=0, timeout=None): |
| 637 | """Run a query and return a value in the first row. |
| 638 | |
| 639 | Pool performs this operation using one of its connections. Other than |
| 640 | that, it behaves identically to |
| 641 | :meth:`Connection.fetchval() |
| 642 | <asyncpg.connection.Connection.fetchval>`. |
| 643 | |
| 644 | .. versionadded:: 0.10.0 |
| 645 | """ |
| 646 | async with self.acquire() as con: |
| 647 | return await con.fetchval( |
| 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. |
no test coverage detected