|
2 | 2 | import hashlib
|
3 | 3 | import time
|
4 | 4 | import warnings
|
5 |
| -from typing import List, Optional |
6 | 5 |
|
7 | 6 | from redis.exceptions import ConnectionError, DataError, NoScriptError, RedisError
|
8 | 7 |
|
@@ -2185,39 +2184,6 @@ def sort(
|
2185 | 2184 | options = {"groups": len(get) if groups else None}
|
2186 | 2185 | return self.execute_command("SORT", *pieces, **options)
|
2187 | 2186 |
|
2188 |
| - def sort_ro( |
2189 |
| - self, |
2190 |
| - key: str, |
2191 |
| - start: Optional[int] = None, |
2192 |
| - num: Optional[int] = None, |
2193 |
| - by: Optional[str] = None, |
2194 |
| - get: Optional[List[str]] = None, |
2195 |
| - desc: bool = False, |
2196 |
| - alpha: bool = False, |
2197 |
| - ) -> list: |
2198 |
| - """ |
2199 |
| - Returns the elements contained in the list, set or sorted set at key. |
2200 |
| - (read-only variant of the SORT command) |
2201 |
| -
|
2202 |
| - ``start`` and ``num`` allow for paging through the sorted data |
2203 |
| -
|
2204 |
| - ``by`` allows using an external key to weight and sort the items. |
2205 |
| - Use an "*" to indicate where in the key the item value is located |
2206 |
| -
|
2207 |
| - ``get`` allows for returning items from external keys rather than the |
2208 |
| - sorted data itself. Use an "*" to indicate where in the key |
2209 |
| - the item value is located |
2210 |
| -
|
2211 |
| - ``desc`` allows for reversing the sort |
2212 |
| -
|
2213 |
| - ``alpha`` allows for sorting lexicographically rather than numerically |
2214 |
| -
|
2215 |
| - For more information check https://redis.io/commands/sort_ro |
2216 |
| - """ |
2217 |
| - return self.sort( |
2218 |
| - key, start=start, num=num, by=by, get=get, desc=desc, alpha=alpha |
2219 |
| - ) |
2220 |
| - |
2221 | 2187 |
|
2222 | 2188 | class ScanCommands:
|
2223 | 2189 | """
|
|
0 commit comments