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

Function sismemberCommand

src/t_set.cpp:414–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412}
413
414void sismemberCommand(client *c) {
415 robj_roptr set;
416
417 if ((set = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == nullptr ||
418 checkType(c,set,OBJ_SET)) return;
419
420 if (setTypeIsMember(set,szFromObj(c->argv[2])))
421 addReply(c,shared.cone);
422 else
423 addReply(c,shared.czero);
424}
425
426void smismemberCommand(client *c) {
427 robj_roptr set;

Callers

nothing calls this directly

Calls 5

lookupKeyReadOrReplyFunction · 0.85
checkTypeFunction · 0.85
setTypeIsMemberFunction · 0.85
szFromObjFunction · 0.85
addReplyFunction · 0.85

Tested by

no test coverage detected