Rewind this cursor to its unevaluated state. Reset this cursor if it has been partially or completely evaluated. Any options that are present on the cursor will remain in effect. Future iterating performed on this cursor will cause new queries to be sent to the serve
(self)
| 1117 | return len(self._data) |
| 1118 | |
| 1119 | async def rewind(self) -> AsyncCursor[_DocumentType]: |
| 1120 | """Rewind this cursor to its unevaluated state. |
| 1121 | |
| 1122 | Reset this cursor if it has been partially or completely evaluated. |
| 1123 | Any options that are present on the cursor will remain in effect. |
| 1124 | Future iterating performed on this cursor will cause new queries to |
| 1125 | be sent to the server, even if the resultant data has already been |
| 1126 | retrieved by this cursor. |
| 1127 | """ |
| 1128 | await self.close() |
| 1129 | self._data = deque() |
| 1130 | self._id = None |
| 1131 | self._address = None |
| 1132 | self._retrieved = 0 |
| 1133 | self._killed = False |
| 1134 | |
| 1135 | return self |
| 1136 | |
| 1137 | async def next(self) -> _DocumentType: |
| 1138 | """Advance the cursor.""" |