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

Function hstrlenCommand

src/t_hash.cpp:872–878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872void hstrlenCommand(client *c) {
873 robj_roptr o;
874
875 if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == nullptr ||
876 checkType(c,o,OBJ_HASH)) return;
877 addReplyLongLong(c,hashTypeGetValueLength(o,szFromObj(c->argv[2])));
878}
879
880static void addHashIteratorCursorToReply(client *c, hashTypeIterator *hi, int what) {
881 if (hi->encoding == OBJ_ENCODING_ZIPLIST) {

Callers

nothing calls this directly

Calls 5

lookupKeyReadOrReplyFunction · 0.85
checkTypeFunction · 0.85
addReplyLongLongFunction · 0.85
hashTypeGetValueLengthFunction · 0.85
szFromObjFunction · 0.85

Tested by

no test coverage detected