MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / execute

Method execute

asyncpg/pool.py:694–709  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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,

Calls 1

acquireMethod · 0.95