Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
e50090aa
Commit
e50090aa
authored
Oct 28, 2013
by
antirez
Browse files
HSCAN implemented.
parent
4a1f1cc0
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/db.c
View file @
e50090aa
...
...
@@ -469,7 +469,7 @@ void scanGenericCommand(redisClient *c, robj *o) {
listAddNodeTail
(
keys
,
(
vstr
!=
NULL
)
?
createStringObject
((
char
*
)
vstr
,
vlen
)
:
createStringObjectFromLongLong
(
vll
));
ziplistNext
(
o
->
ptr
,
p
);
p
=
ziplistNext
(
o
->
ptr
,
p
);
}
}
else
{
redisPanic
(
"Not handled encoding in SCAN."
);
...
...
src/redis.c
View file @
e50090aa
...
...
@@ -195,6 +195,7 @@ struct redisCommand redisCommandTable[] = {
{
"hvals"
,
hvalsCommand
,
2
,
"rS"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"hgetall"
,
hgetallCommand
,
2
,
"r"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"hexists"
,
hexistsCommand
,
3
,
"r"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"hscan"
,
hscanCommand
,
-
3
,
"rR"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"incrby"
,
incrbyCommand
,
3
,
"wm"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"decrby"
,
decrbyCommand
,
3
,
"wm"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
{
"incrbyfloat"
,
incrbyfloatCommand
,
3
,
"wm"
,
0
,
NULL
,
1
,
1
,
1
,
0
,
0
},
...
...
src/redis.h
View file @
e50090aa
...
...
@@ -1344,6 +1344,7 @@ void hkeysCommand(redisClient *c);
void
hvalsCommand
(
redisClient
*
c
);
void
hgetallCommand
(
redisClient
*
c
);
void
hexistsCommand
(
redisClient
*
c
);
void
hscanCommand
(
redisClient
*
c
);
void
configCommand
(
redisClient
*
c
);
void
hincrbyCommand
(
redisClient
*
c
);
void
hincrbyfloatCommand
(
redisClient
*
c
);
...
...
src/t_hash.c
View file @
e50090aa
...
...
@@ -759,3 +759,11 @@ void hexistsCommand(redisClient *c) {
addReply
(
c
,
hashTypeExists
(
o
,
c
->
argv
[
2
])
?
shared
.
cone
:
shared
.
czero
);
}
void
hscanCommand
(
redisClient
*
c
)
{
robj
*
o
;
if
((
o
=
lookupKeyReadOrReply
(
c
,
c
->
argv
[
1
],
shared
.
emptyscan
))
==
NULL
||
checkType
(
c
,
o
,
REDIS_HASH
))
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