On success retrieve the double score associated at the sorted set element * 'ele' and returns REDISMODULE_OK. Otherwise REDISMODULE_ERR is returned * to signal one of the following conditions: * * * There is no such element 'ele' in the sorted set. * * The key is not a sorted set. * * The key is an open empty key. */
| 2730 | * * The key is an open empty key. |
| 2731 | */ |
| 2732 | int RM_ZsetScore(RedisModuleKey *key, RedisModuleString *ele, double *score) { |
| 2733 | if (key->value == NULL) return REDISMODULE_ERR; |
| 2734 | if (key->value->type != OBJ_ZSET) return REDISMODULE_ERR; |
| 2735 | if (zsetScore(key->value,ele->ptr,score) == C_ERR) return REDISMODULE_ERR; |
| 2736 | return REDISMODULE_OK; |
| 2737 | } |
| 2738 | |
| 2739 | /* -------------------------------------------------------------------------- |
| 2740 | * ## Key API for Sorted Set iterator |
nothing calls this directly
no test coverage detected