Execute an SQL command (or commands). Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.execute() `. .. versionadded:: 0.10.0
(
self,
query: str,
*args,
timeout: Optional[float]=None,
)
| 692 | return con |
| 693 | |
| 694 | async def execute( |
| 695 | self, |
| 696 | query: str, |
| 697 | *args, |
| 698 | timeout: Optional[float]=None, |
| 699 | ) -> str: |
| 700 | """Execute an SQL command (or commands). |
| 701 | |
| 702 | Pool performs this operation using one of its connections. Other than |
| 703 | that, it behaves identically to |
| 704 | :meth:`Connection.execute() <asyncpg.connection.Connection.execute>`. |
| 705 | |
| 706 | .. versionadded:: 0.10.0 |
| 707 | """ |
| 708 | async with self.acquire() as con: |
| 709 | return await con.execute(query, *args, timeout=timeout) |
| 710 | |
| 711 | async def executemany( |
| 712 | self, |