Execute the same command with a sequence of input data.
(
self, query: Query, params_seq: Iterable[Params], *, returning: bool = False
)
| 118 | return self |
| 119 | |
| 120 | async def executemany( |
| 121 | self, query: Query, params_seq: Iterable[Params], *, returning: bool = False |
| 122 | ) -> None: |
| 123 | """ |
| 124 | Execute the same command with a sequence of input data. |
| 125 | """ |
| 126 | try: |
| 127 | async with self._conn.lock: |
| 128 | if AsyncPipeline.is_supported(): |
| 129 | # If there is already a pipeline, ride it, in order to avoid |
| 130 | # sending unnecessary Sync. |
| 131 | if self._conn._pipeline: |
| 132 | await self._conn.wait( |
| 133 | self._executemany_gen_pipeline(query, params_seq, returning) |
| 134 | ) |
| 135 | # Otherwise, make a new one |
| 136 | else: |
| 137 | async with self._conn._pipeline_nolock(): |
| 138 | await self._conn.wait( |
| 139 | self._executemany_gen_pipeline( |
| 140 | query, params_seq, returning |
| 141 | ) |
| 142 | ) |
| 143 | else: |
| 144 | await self._conn.wait( |
| 145 | self._executemany_gen_no_pipeline(query, params_seq, returning) |
| 146 | ) |
| 147 | except e._NO_TRACEBACK as ex: |
| 148 | raise ex.with_traceback(None) |
| 149 | |
| 150 | async def stream( |
| 151 | self, |
nothing calls this directly
no test coverage detected