MCPcopy
hub / github.com/MagicStack/asyncpg / execute

Method execute

asyncpg/pool.py:577–592  ·  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

575 return con
576
577 async def execute(
578 self,
579 query: str,
580 *args,
581 timeout: Optional[float]=None,
582 ) -> str:
583 """Execute an SQL command (or commands).
584
585 Pool performs this operation using one of its connections. Other than
586 that, it behaves identically to
587 :meth:`Connection.execute() <asyncpg.connection.Connection.execute>`.
588
589 .. versionadded:: 0.10.0
590 """
591 async with self.acquire() as con:
592 return await con.execute(query, *args, timeout=timeout)
593
594 async def executemany(
595 self,

Calls 1

acquireMethod · 0.95