MCPcopy
hub / github.com/psycopg/psycopg / _exit_gen

Method _exit_gen

psycopg/psycopg/_pipeline_base.py:98–106  ·  view source on GitHub ↗

Exit current pipeline by sending a Sync and fetch back all remaining results.

(self)

Source from the content-addressed store, hash-verified

96 yield from self._fetch_gen(flush=False)
97
98 def _exit_gen(self) -> PQGen[None]:
99 """
100 Exit current pipeline by sending a Sync and fetch back all remaining results.
101 """
102 try:
103 self._enqueue_sync()
104 yield from self._communicate_gen()
105 finally:
106 yield from self._fetch_gen(flush=True)
107
108 def _communicate_gen(self) -> PQGen[None]:
109 """Communicate with pipeline to send commands and possibly fetch

Callers 2

__exit__Method · 0.45
__aexit__Method · 0.45

Calls 3

_enqueue_syncMethod · 0.95
_communicate_genMethod · 0.95
_fetch_genMethod · 0.95

Tested by

no test coverage detected