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
80bde984
Commit
80bde984
authored
Sep 27, 2018
by
antirez
Browse files
Modules: Modules: dictionary API WIP #12: DictCompare API.
parent
7af83a0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
80bde984
...
...
@@ -4586,6 +4586,14 @@ int RM_DictCompareC(RedisModuleDictIter *di, const char *op, void *key, size_t k
return
res
?
REDISMODULE_OK
:
REDISMODULE_ERR
;
}
/* Like RedisModule_DictCompareC but gets the key to compare with the current
* iterator key as a RedisModuleString. */
int
RM_DictCompare
(
RedisModuleDictIter
*
di
,
const
char
*
op
,
RedisModuleString
*
key
)
{
if
(
raxEOF
(
&
di
->
ri
))
return
REDISMODULE_ERR
;
int
res
=
raxCompare
(
&
di
->
ri
,
op
,
key
->
ptr
,
sdslen
(
key
->
ptr
));
return
res
?
REDISMODULE_OK
:
REDISMODULE_ERR
;
}
/* --------------------------------------------------------------------------
* Modules utility APIs
* -------------------------------------------------------------------------- */
...
...
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