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

Function zrangeResultFinalizeStore

src/t_zset.cpp:2974–2990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2972}
2973
2974static void zrangeResultFinalizeStore(zrange_result_handler *handler, size_t result_count)
2975{
2976 if (result_count) {
2977 setKey(handler->client, handler->client->db, handler->dstkey, handler->dstobj);
2978 addReplyLongLong(handler->client, result_count);
2979 notifyKeyspaceEvent(NOTIFY_ZSET, "zrangestore", handler->dstkey, handler->client->db->id);
2980 g_pserver->dirty++;
2981 } else {
2982 addReply(handler->client, shared.czero);
2983 if (dbDelete(handler->client->db, handler->dstkey)) {
2984 signalModifiedKey(handler->client, handler->client->db, handler->dstkey);
2985 notifyKeyspaceEvent(NOTIFY_GENERIC, "del", handler->dstkey, handler->client->db->id);
2986 g_pserver->dirty++;
2987 }
2988 }
2989 decrRefCount(handler->dstobj);
2990}
2991
2992/* Initialize the consumer interface type with the requested type. */
2993static void zrangeResultHandlerInit(zrange_result_handler *handler,

Callers

nothing calls this directly

Calls 7

setKeyFunction · 0.85
addReplyLongLongFunction · 0.85
notifyKeyspaceEventFunction · 0.85
addReplyFunction · 0.85
dbDeleteFunction · 0.85
signalModifiedKeyFunction · 0.85
decrRefCountFunction · 0.85

Tested by

no test coverage detected