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

Function zmscoreCommand

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

Source from the content-addressed store, hash-verified

3744}
3745
3746void zmscoreCommand(client *c) {
3747 robj *key = c->argv[1];
3748 robj *zobj;
3749 double score;
3750 zobj = lookupKeyRead(c->db,key);
3751 if (checkType(c,zobj,OBJ_ZSET)) return;
3752
3753 addReplyArrayLen(c,c->argc - 2);
3754 for (int j = 2; j < c->argc; j++) {
3755 /* Treat a missing set the same way as an empty set */
3756 if (zobj == NULL || zsetScore(zobj,c->argv[j]->ptr,&score) == C_ERR) {
3757 addReplyNull(c);
3758 } else {
3759 addReplyDouble(c,score);
3760 }
3761 }
3762}
3763
3764void zrankGenericCommand(client *c, int reverse) {
3765 robj *key = c->argv[1];

Callers

nothing calls this directly

Calls 6

lookupKeyReadFunction · 0.85
checkTypeFunction · 0.85
addReplyArrayLenFunction · 0.85
zsetScoreFunction · 0.85
addReplyNullFunction · 0.85
addReplyDoubleFunction · 0.85

Tested by

no test coverage detected