MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / execute

Method execute

web/pgadmin/utils/driver/psycopg3/cursor.py:282–294  ·  view source on GitHub ↗

Execute function Mirrors ``DictCursor.execute`` so this cursor stays substitutable for ``psycopg.AsyncCursor`` when used via ``AsyncConnection.execute``.

(self, query, params=None, *, prepare=None, binary=None)

Source from the content-addressed store, hash-verified

280 return self._odt_desc
281
282 def execute(self, query, params=None, *, prepare=None, binary=None):
283 """
284 Execute function
285
286 Mirrors ``DictCursor.execute`` so this cursor stays substitutable
287 for ``psycopg.AsyncCursor`` when used via ``AsyncConnection.execute``.
288 """
289 try:
290 return asyncio.run(
291 self._execute(query, params, prepare=prepare, binary=binary)
292 )
293 except RuntimeError as e:
294 current_app.logger.exception(e)
295
296 async def _execute(self, query, params=None, *,
297 prepare=None, binary=None):

Callers

nothing calls this directly

Calls 2

_executeMethod · 0.95
runMethod · 0.45

Tested by

no test coverage detected