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

Function zscoreCommand

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

Source from the content-addressed store, hash-verified

3729}
3730
3731void zscoreCommand(client *c) {
3732 robj *key = c->argv[1];
3733 robj *zobj;
3734 double score;
3735
3736 if ((zobj = lookupKeyReadOrReply(c,key,shared.null[c->resp])) == NULL ||
3737 checkType(c,zobj,OBJ_ZSET)) return;
3738
3739 if (zsetScore(zobj,c->argv[2]->ptr,&score) == C_ERR) {
3740 addReplyNull(c);
3741 } else {
3742 addReplyDouble(c,score);
3743 }
3744}
3745
3746void zmscoreCommand(client *c) {
3747 robj *key = c->argv[1];

Callers

nothing calls this directly

Calls 5

lookupKeyReadOrReplyFunction · 0.85
checkTypeFunction · 0.85
zsetScoreFunction · 0.85
addReplyNullFunction · 0.85
addReplyDoubleFunction · 0.85

Tested by

no test coverage detected