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

Function zrangeResultFinalizeClient

src/t_zset.cpp:2933–2944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2931}
2932
2933static void zrangeResultFinalizeClient(zrange_result_handler *handler,
2934 size_t result_count)
2935{
2936 /* In case of WITHSCORES, respond with a single array in RESP2, and
2937 * nested arrays in RESP3. We can't use a map response type since the
2938 * client library needs to know to respect the order. */
2939 if (handler->withscores && (handler->client->resp == 2)) {
2940 result_count *= 2;
2941 }
2942
2943 setDeferredArrayLen(handler->client, handler->userdata, result_count);
2944}
2945
2946/* Result handler methods for storing the ZRANGESTORE to a zset. */
2947static void zrangeResultBeginStore(zrange_result_handler *handler)

Callers

nothing calls this directly

Calls 1

setDeferredArrayLenFunction · 0.85

Tested by

no test coverage detected