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

Method _prepare

asyncpg/connection.py:668–687  ·  view source on GitHub ↗
(
        self,
        query,
        *,
        name: typing.Union[str, bool, None] = None,
        timeout=None,
        use_cache: bool=False,
        record_class=None
    )

Source from the content-addressed store, hash-verified

666 )
667
668 async def _prepare(
669 self,
670 query,
671 *,
672 name: typing.Union[str, bool, None] = None,
673 timeout=None,
674 use_cache: bool=False,
675 record_class=None
676 ):
677 self._check_open()
678 if name is None:
679 name = self._stmt_cache_enabled
680 stmt = await self._get_statement(
681 query,
682 timeout,
683 named=name,
684 use_cache=use_cache,
685 record_class=record_class,
686 )
687 return prepared_stmt.PreparedStatement(self, query, stmt)
688
689 async def fetch(
690 self,

Calls 2

_check_openMethod · 0.95
_get_statementMethod · 0.95