MCPcopy Create free account
hub / github.com/F-Stack/f-stack / RM_DictCompareC

Function RM_DictCompareC

app/redis-6.2.6/src/module.c:6878–6882  ·  view source on GitHub ↗

Compare the element currently pointed by the iterator to the specified * element given by key/keylen, according to the operator 'op' (the set of * valid operators are the same valid for RedisModule_DictIteratorStart). * If the comparision is successful the command returns REDISMODULE_OK * otherwise REDISMODULE_ERR is returned. * * This is useful when we want to just emit a lexicographical ra

Source from the content-addressed store, hash-verified

6876 * The function return REDISMODULE_ERR if the iterator reached the
6877 * end of elements condition as well. */
6878int RM_DictCompareC(RedisModuleDictIter *di, const char *op, void *key, size_t keylen) {
6879 if (raxEOF(&di->ri)) return REDISMODULE_ERR;
6880 int res = raxCompare(&di->ri,op,key,keylen);
6881 return res ? REDISMODULE_OK : REDISMODULE_ERR;
6882}
6883
6884/* Like RedisModule_DictCompareC but gets the key to compare with the current
6885 * iterator key as a RedisModuleString. */

Callers

nothing calls this directly

Calls 2

raxEOFFunction · 0.85
raxCompareFunction · 0.85

Tested by

no test coverage detected