MCPcopy Create free account
hub / github.com/piccolo-orm/piccolo / _run_in_pool

Method _run_in_pool

piccolo/engine/postgres.py:510–521  ·  view source on GitHub ↗
(
        self, query: str, args: Optional[Sequence[Any]] = None
    )

Source from the content-addressed store, hash-verified

508 ###########################################################################
509
510 async def _run_in_pool(
511 self, query: str, args: Optional[Sequence[Any]] = None
512 ):
513 if args is None:
514 args = []
515 if not self.pool:
516 raise ValueError("A pool isn't currently running.")
517
518 async with self.pool.acquire() as connection:
519 response = await connection.fetch(query, *args)
520
521 return response
522
523 async def _run_in_new_connection(
524 self, query: str, args: Optional[Sequence[Any]] = None

Callers 2

run_querystringMethod · 0.95
run_ddlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected