MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / moduleInitKeyTypeSpecific

Function moduleInitKeyTypeSpecific

src/module.cpp:2311–2316  ·  view source on GitHub ↗

Initialize the type-specific part of the key. Only when key has a value. */

Source from the content-addressed store, hash-verified

2309
2310/* Initialize the type-specific part of the key. Only when key has a value. */
2311static void moduleInitKeyTypeSpecific(RedisModuleKey *key) {
2312 switch (key->value->type) {
2313 case OBJ_ZSET: zsetKeyReset(key); break;
2314 case OBJ_STREAM: key->u.stream.signalready = 0; break;
2315 }
2316}
2317
2318/* Return an handle representing a Redis key, so that it is possible
2319 * to call other APIs with the key handle as argument to perform

Callers 2

moduleCreateEmptyKeyFunction · 0.85
moduleInitKeyFunction · 0.85

Calls 1

zsetKeyResetFunction · 0.85

Tested by

no test coverage detected