Execute an SQL *command* for each sequence of arguments in *args*. Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.executemany() `. .. version
(
self,
command: str,
args,
*,
timeout: Optional[float]=None,
)
| 709 | return await con.execute(query, *args, timeout=timeout) |
| 710 | |
| 711 | async def executemany( |
| 712 | self, |
| 713 | command: str, |
| 714 | args, |
| 715 | *, |
| 716 | timeout: Optional[float]=None, |
| 717 | ): |
| 718 | """Execute an SQL *command* for each sequence of arguments in *args*. |
| 719 | |
| 720 | Pool performs this operation using one of its connections. Other than |
| 721 | that, it behaves identically to |
| 722 | :meth:`Connection.executemany() |
| 723 | <asyncpg.connection.Connection.executemany>`. |
| 724 | |
| 725 | .. versionadded:: 0.10.0 |
| 726 | """ |
| 727 | async with self.acquire() as con: |
| 728 | return await con.executemany(command, args, timeout=timeout) |
| 729 | |
| 730 | async def fetch( |
| 731 | self, |