ZSCAN
ZSCAN key cursor [MATCH pattern] [COUNT count]
zscan(
name: KeyT,
cursor: int = 0,
match: Union[PatternT, None] = None,
count: Optional[int] = None,
score_cast_func: Union[type, Callable] = float
) → ResponseT
Possible errors
- ERR syntax error:
ResponseError
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zScan(
key: RedisArgument,
cursor: RedisArgument,
options?: ScanCommonOptions
) → Any
Possible errors
- ERR syntax error:
SimpleError
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
key: RedisKey,
cursor: number | string,
callback?: Callback<[cursor: string, elements: string[]]>
) → Result<[cursor: string, elements: string[]], Context>
zscan(
key: RedisKey,
cursor: number | string,
countToken: "COUNT",
count: number | string,
callback?: Callback<[cursor: string, elements: string[]]>
) → Result<[cursor: string, elements: string[]], Context>
zscan(
key: RedisKey,
cursor: number | string,
patternToken: "MATCH",
pattern: string,
callback?: Callback<[cursor: string, elements: string[]]>
) → Result<[cursor: string, elements: string[]], Context>
zscan(
key: RedisKey,
cursor: number | string,
patternToken: "MATCH",
pattern: string,
countToken: "COUNT",
count: number | string,
callback?: Callback<[cursor: string, elements: string[]]>
) → Result<[cursor: string, elements: string[]], Context>
Possible errors
- ERR syntax error:
ReplyError
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
key: byte[],
cursor: byte[]
) → ScanResult<Tuple> // OK @deprecated Use Jedis#set(String, String, redis.clients.jedis.params.SetParams) with redis.clients.jedis.params.SetParams#px(long). Deprecated in Jedis 8.0.0. Mirrors Redis deprecation since 2.6.12.
zscan(
key: Any,
cursor: Any,
ScanParams(: new
) → return // OK @deprecated Use Jedis#set(String, String, redis.clients.jedis.params.SetParams) with redis.clients.jedis.params.SetParams#px(long). Deprecated in Jedis 8.0.0. Mirrors Redis deprecation since 2.6.12.
zscan(
key: byte[],
cursor: byte[],
params: ScanParams
) → ScanResult<Tuple> // OK @deprecated Use Jedis#set(String, String, redis.clients.jedis.params.SetParams) with redis.clients.jedis.params.SetParams#px(long). Deprecated in Jedis 8.0.0. Mirrors Redis deprecation since 2.6.12.
zscan(
key: String,
cursor: String,
params: ScanParams
) → ScanResult<Tuple> // OK @deprecated Use Jedis#set(String, String, redis.clients.jedis.params.SetParams) with redis.clients.jedis.params.SetParams#px(long). Deprecated in Jedis 8.0.0. Mirrors Redis deprecation since 2.6.12.
Possible errors
- ERR syntax error:
JedisDataException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
key: K // the key.
) → ScoredValueScanCursor<V> // StreamScanCursor scan cursor.
zscan(
key: K, // the key.
scanArgs: ScanArgs
) → ScoredValueScanCursor<V> // StreamScanCursor scan cursor.
zscan(
key: K, // the key.
scanCursor: ScanCursor, // cursor to resume from a previous scan, must not be null.
scanArgs: ScanArgs
) → ScoredValueScanCursor<V> // StreamScanCursor scan cursor.
zscan(
key: K, // the key.
scanCursor: ScanCursor // cursor to resume from a previous scan, must not be null.
) → ScoredValueScanCursor<V> // StreamScanCursor scan cursor.
zscan(
channel: ScoredValueStreamingChannel<V>, // streaming channel that receives a call for every scored value.
key: K // the key.
) → StreamScanCursor // StreamScanCursor scan cursor.
Possible errors
- ERR syntax error:
RedisCommandExecutionException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
key: K // the key.
) → RedisFuture<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor.
zscan(
key: K, // the key.
scanArgs: ScanArgs
) → RedisFuture<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor.
zscan(
key: K, // the key.
scanCursor: ScanCursor, // cursor to resume from a previous scan, must not be null.
scanArgs: ScanArgs
) → RedisFuture<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor.
zscan(
key: K, // the key.
scanCursor: ScanCursor // cursor to resume from a previous scan, must not be null.
) → RedisFuture<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor.
zscan(
channel: ScoredValueStreamingChannel<V>, // streaming channel that receives a call for every scored value.
key: K // the key.
) → RedisFuture<StreamScanCursor> // StreamScanCursor scan cursor.
Possible errors
- ERR syntax error:
RedisCommandExecutionException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
key: K // the key.
) → Mono<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor. @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zscan.
zscan(
key: K, // the key.
scanArgs: ScanArgs
) → Mono<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor. @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zscan.
zscan(
key: K, // the key.
scanCursor: ScanCursor, // cursor to resume from a previous scan, must not be null.
scanArgs: ScanArgs
) → Mono<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor. @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zscan.
zscan(
key: K, // the key.
scanCursor: ScanCursor // cursor to resume from a previous scan, must not be null.
) → Mono<ScoredValueScanCursor<V>> // StreamScanCursor scan cursor. @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zscan.
zscan(
channel: ScoredValueStreamingChannel<V>, // streaming channel that receives a call for every scored value.
key: K // the key.
) → Mono<StreamScanCursor> // StreamScanCursor scan cursor. @deprecated since 6.0 in favor of consuming large results through the org.reactivestreams.Publisher returned by #zscan.
Possible errors
- ERR syntax error:
RedisCommandExecutionException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
ZScan(
ctx: context.Context,
key: string,
cursor: uint64,
match: string,
count: int64
) → *ScanCmd
Possible errors
- ERR syntax error:
redis.Error
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
SortedSetScan(
key: RedisKey, // The key of the sorted set.
pattern: RedisValue, // The pattern to match.
pageSize: int, // The page size to iterate by.
flags: CommandFlags // The flags to use for this operation.
) → IEnumerable<SortedSetEntry> // Yields all matching elements of the sorted set.
SortedSetScan(
key: RedisKey, // The key of the sorted set.
pattern: RedisValue, // The pattern to match.
pageSize: int, // The page size to iterate by.
cursor: long, // The cursor position to start at.
pageOffset: int, // The page offset to start at.
flags: CommandFlags // The flags to use for this operation.
) → IEnumerable<SortedSetEntry> // Yields all matching elements of the sorted set.
Possible errors
- ERR syntax error:
RedisServerException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
SortedSetScanAsync(
key: RedisKey, // The key of the sorted set.
pattern: RedisValue, // The pattern to match.
pageSize: int, // The page size to iterate by.
cursor: long, // The cursor position to start at.
pageOffset: int, // The page offset to start at.
flags: CommandFlags // The flags to use for this operation.
) → IAsyncEnumerable<SortedSetEntry> // Yields all matching elements of the sorted set.
Possible errors
- ERR syntax error:
RedisServerException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
$key: string,
$cursor: int,
$options: ?array
) → array
Possible errors
- ERR syntax error:
Predis\Response\ServerException
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
zscan(
key: String,
cursor: String, Integer, // the cursor of the iteration
match: String, // only return keys matching the pattern
count: Integer // return count keys at most per iteration
) → Array // the next cursor and all found members and scores
Possible errors
- ERR syntax error:
Redis::CommandError
See Redis error messages for what each error means. Other errors, such as connection errors, aren't listed.
No method signature available for this client.
No method signature available for this client.
- Available since:
- Redis Open Source 2.8.0
- Time complexity:
- O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.
- ACL categories:
-
@read,@sortedset,@slow, - Compatibility:
- Redis Software and Redis Cloud compatibility
See SCAN for ZSCAN documentation.
Required arguments
key
The name of the key that holds the sorted set.
cursor
The cursor value. Start an iteration with 0, then use the cursor returned by each call as the argument to the next call.
Optional arguments
MATCH pattern
Only return members matching the given glob-style pattern.
COUNT count
A hint for the number of members to return per iteration. The default is 10.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |