Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2c643ffa
Commit
2c643ffa
authored
Oct 28, 2013
by
antirez
Browse files
ZSCAN implemented.
parent
e50090aa
Changes
3
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
2c643ffa
...
...
@@ -182,6 +182,7 @@ struct redisCommand redisCommandTable[] = {
{"zscore",zscoreCommand,3,"r",0,NULL,1,1,1,0,0},
{"zrank",zrankCommand,3,"r",0,NULL,1,1,1,0,0},
{"zrevrank",zrevrankCommand,3,"r",0,NULL,1,1,1,0,0},
{"zscan",zscanCommand,-3,"rR",0,NULL,1,1,1,0,0},
{"hset",hsetCommand,4,"wm",0,NULL,1,1,1,0,0},
{"hsetnx",hsetnxCommand,4,"wm",0,NULL,1,1,1,0,0},
{"hget",hgetCommand,3,"r",0,NULL,1,1,1,0,0},
...
...
src/redis.h
View file @
2c643ffa
...
...
@@ -1340,6 +1340,7 @@ void hlenCommand(redisClient *c);
void
zremrangebyrankCommand
(
redisClient
*
c
);
void
zunionstoreCommand
(
redisClient
*
c
);
void
zinterstoreCommand
(
redisClient
*
c
);
void
zscanCommand
(
redisClient
*
c
);
void
hkeysCommand
(
redisClient
*
c
);
void
hvalsCommand
(
redisClient
*
c
);
void
hgetallCommand
(
redisClient
*
c
);
...
...
src/t_zset.c
View file @
2c643ffa
...
...
@@ -2207,3 +2207,11 @@ void zrankCommand(redisClient *c) {
void
zrevrankCommand
(
redisClient
*
c
)
{
zrankGenericCommand
(
c
,
1
);
}
void
zscanCommand
(
redisClient
*
c
)
{
robj
*
o
;
if
((
o
=
lookupKeyReadOrReply
(
c
,
c
->
argv
[
1
],
shared
.
emptyscan
))
==
NULL
||
checkType
(
c
,
o
,
REDIS_ZSET
))
return
;
scanGenericCommand
(
c
,
o
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment