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

Function zrangeResultHandlerInit

app/redis-6.2.6/src/t_zset.c:2994–3016  ·  view source on GitHub ↗

Initialize the consumer interface type with the requested type. */

Source from the content-addressed store, hash-verified

2992
2993/* Initialize the consumer interface type with the requested type. */
2994static void zrangeResultHandlerInit(zrange_result_handler *handler,
2995 client *client, zrange_consumer_type type)
2996{
2997 memset(handler, 0, sizeof(*handler));
2998
2999 handler->client = client;
3000
3001 switch (type) {
3002 case ZRANGE_CONSUMER_TYPE_CLIENT:
3003 handler->beginResultEmission = zrangeResultBeginClient;
3004 handler->finalizeResultEmission = zrangeResultFinalizeClient;
3005 handler->emitResultFromCBuffer = zrangeResultEmitCBufferToClient;
3006 handler->emitResultFromLongLong = zrangeResultEmitLongLongToClient;
3007 break;
3008
3009 case ZRANGE_CONSUMER_TYPE_INTERNAL:
3010 handler->beginResultEmission = zrangeResultBeginStore;
3011 handler->finalizeResultEmission = zrangeResultFinalizeStore;
3012 handler->emitResultFromCBuffer = zrangeResultEmitCBufferForStore;
3013 handler->emitResultFromLongLong = zrangeResultEmitLongLongForStore;
3014 break;
3015 }
3016}
3017
3018static void zrangeResultHandlerScoreEmissionEnable(zrange_result_handler *handler) {
3019 handler->withscores = 1;

Callers 7

zrangestoreCommandFunction · 0.85
zrangeCommandFunction · 0.85
zrevrangeCommandFunction · 0.85
zrangebyscoreCommandFunction · 0.85
zrevrangebyscoreCommandFunction · 0.85
zrangebylexCommandFunction · 0.85
zrevrangebylexCommandFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected