Make an iterator using the SSCAN command so that the client doesn't need to remember the cursor position. ``match`` allows for filtering the keys by pattern ``count`` allows for hint the minimum number of returns
(
self,
name: KeyT,
match: Union[PatternT, None] = None,
count: Optional[int] = None,
)
| 6241 | yield d |
| 6242 | |
| 6243 | async def sscan_iter( |
| 6244 | self, |
| 6245 | name: KeyT, |
| 6246 | match: Union[PatternT, None] = None, |
| 6247 | count: Optional[int] = None, |
| 6248 | ) -> AsyncIterator: |
| 6249 | """ |
| 6250 | Make an iterator using the SSCAN command so that the client doesn't |
| 6251 | need to remember the cursor position. |
| 6252 | |
| 6253 | ``match`` allows for filtering the keys by pattern |
| 6254 | |
| 6255 | ``count`` allows for hint the minimum number of returns |
| 6256 | """ |
| 6257 | cursor = "0" |
| 6258 | while cursor != 0: |
| 6259 | cursor, data = await self.sscan( |
| 6260 | name, cursor=cursor, match=match, count=count |
| 6261 | ) |
| 6262 | for d in data: |
| 6263 | yield d |
| 6264 | |
| 6265 | async def hscan_iter( |
| 6266 | self, |