Advance the cursor.
(self)
| 1133 | return self |
| 1134 | |
| 1135 | def next(self) -> _DocumentType: |
| 1136 | """Advance the cursor.""" |
| 1137 | if not self._exhaust_checked: |
| 1138 | self._exhaust_checked = True |
| 1139 | self._supports_exhaust() |
| 1140 | if self._empty: |
| 1141 | raise StopIteration |
| 1142 | if len(self._data) or self._refresh(): |
| 1143 | return self._data.popleft() |
| 1144 | else: |
| 1145 | raise StopIteration |
| 1146 | |
| 1147 | def _next_batch(self, result: list, total: Optional[int] = None) -> bool: # type: ignore[type-arg] |
| 1148 | """Get all or some documents from the cursor.""" |