Fix RedisModule_HashGet examples (#6697)

This commit is contained in:
Guy Korland 2020-09-24 12:45:30 +03:00 committed by GitHub
parent 795c454db1
commit b464afb9e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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_CFIELDS: 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_CFIELDS:
* *
* 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.