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

Function zcardCommand

src/t_zset.cpp:3720–3728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3718}
3719
3720void zcardCommand(client *c) {
3721 robj *key = c->argv[1];
3722 robj_roptr zobj;
3723
3724 if ((zobj = lookupKeyReadOrReply(c,key,shared.czero)) == nullptr ||
3725 checkType(c,zobj,OBJ_ZSET)) return;
3726
3727 addReplyLongLong(c,zsetLength(zobj));
3728}
3729
3730void zscoreCommand(client *c) {
3731 robj *key = c->argv[1];

Callers

nothing calls this directly

Calls 4

lookupKeyReadOrReplyFunction · 0.85
checkTypeFunction · 0.85
addReplyLongLongFunction · 0.85
zsetLengthFunction · 0.85

Tested by

no test coverage detected