mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Fix RedisModule_HashGet examples (#6697)
This commit is contained in:
parent
795c454db1
commit
b464afb9e2
@ -2953,22 +2953,22 @@ int RM_HashSet(RedisModuleKey *key, int flags, ...) {
|
||||
* As with RedisModule_HashSet() the behavior of the command can be specified
|
||||
* passing flags different than REDISMODULE_HASH_NONE:
|
||||
*
|
||||
* REDISMODULE_HASH_CFIELD: field names as null terminated C strings.
|
||||
* REDISMODULE_HASH_CFIELDS: field names as null terminated C strings.
|
||||
*
|
||||
* REDISMODULE_HASH_EXISTS: instead of setting the value of the field
|
||||
* expecting a RedisModuleString pointer to pointer, the function just
|
||||
* reports if the field exists or not and expects an integer pointer
|
||||
* as the second element of each pair.
|
||||
*
|
||||
* Example of REDISMODULE_HASH_CFIELD:
|
||||
* Example of REDISMODULE_HASH_CFIELDS:
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* 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 key is not an hash value.
|
||||
|
Loading…
Reference in New Issue
Block a user