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
b464afb9
Unverified
Commit
b464afb9
authored
Sep 24, 2020
by
Guy Korland
Committed by
GitHub
Sep 24, 2020
Browse files
Fix RedisModule_HashGet examples (#6697)
parent
795c454d
Changes
1
Show whitespace changes
Inline
Side-by-side
src/module.c
View file @
b464afb9
...
@@ -2953,22 +2953,22 @@ int RM_HashSet(RedisModuleKey *key, int flags, ...) {
...
@@ -2953,22 +2953,22 @@ int RM_HashSet(RedisModuleKey *key, int flags, ...) {
* As with RedisModule_HashSet() the behavior of the command can be specified
* As with RedisModule_HashSet() the behavior of the command can be specified
* passing flags different than REDISMODULE_HASH_NONE:
* passing flags different than REDISMODULE_HASH_NONE:
*
*
* REDISMODULE_HASH_CFIELD: field names as null terminated C strings.
* REDISMODULE_HASH_CFIELD
S
: field names as null terminated C strings.
*
*
* REDISMODULE_HASH_EXISTS: instead of setting the value of the field
* REDISMODULE_HASH_EXISTS: instead of setting the value of the field
* expecting a RedisModuleString pointer to pointer, the function just
* expecting a RedisModuleString pointer to pointer, the function just
* reports if the field exists or not and expects an integer pointer
* reports if the field exists or not and expects an integer pointer
* as the second element of each pair.
* as the second element of each pair.
*
*
* Example of REDISMODULE_HASH_CFIELD:
* Example of REDISMODULE_HASH_CFIELD
S
:
*
*
* RedisModuleString *username, *hashedpass;
* RedisModuleString *username, *hashedpass;
* RedisModule_HashGet(mykey,"username",&username,"hp",&hashedpass, NULL);
* RedisModule_HashGet(mykey,
REDISMODULE_HASH_CFIELDS,
"username",&username,"hp",&hashedpass, NULL);
*
*
* Example of REDISMODULE_HASH_EXISTS:
* Example of REDISMODULE_HASH_EXISTS:
*
*
* int exists;
* int exists;
* RedisModule_HashGet(mykey,argv[1],&exists,NULL);
* RedisModule_HashGet(mykey,
REDISMODULE_HASH_EXISTS,
argv[1],&exists,NULL);
*
*
* The function returns REDISMODULE_OK on success and REDISMODULE_ERR if
* The function returns REDISMODULE_OK on success and REDISMODULE_ERR if
* the key is not an hash value.
* the key is not an hash value.
...
...
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