(self)
| 221 | |
| 222 | @connresource.guarded |
| 223 | async def __anext__(self): |
| 224 | if self._state is None: |
| 225 | self._state = await self._connection._get_statement( |
| 226 | self._query, |
| 227 | self._timeout, |
| 228 | named=True, |
| 229 | record_class=self._record_class, |
| 230 | ) |
| 231 | self._state.attach() |
| 232 | |
| 233 | if not self._portal_name and not self._exhausted: |
| 234 | buffer = await self._bind_exec(self._prefetch, self._timeout) |
| 235 | self._buffer.extend(buffer) |
| 236 | |
| 237 | if not self._buffer and not self._exhausted: |
| 238 | buffer = await self._exec(self._prefetch, self._timeout) |
| 239 | self._buffer.extend(buffer) |
| 240 | |
| 241 | if self._portal_name and self._exhausted: |
| 242 | await self._close_portal(self._timeout) |
| 243 | |
| 244 | if self._buffer: |
| 245 | return self._buffer.popleft() |
| 246 | |
| 247 | raise StopAsyncIteration |
| 248 | |
| 249 | |
| 250 | class Cursor(BaseCursor): |
nothing calls this directly
no test coverage detected