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

Function checkType

src/object.cpp:440–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440int checkType(client *c, robj_roptr o, int type) {
441 /* A NULL is considered an empty key */
442 if (o && o->type != type) {
443 addReplyErrorObject(c,shared.wrongtypeerr);
444 return 1;
445 }
446 return 0;
447}
448
449int isSdsRepresentableAsLongLong(const char *s, long long *llval) {
450 return string2ll(s,sdslen(s),llval) ? C_OK : C_ERR;

Callers 15

hgetCommandFunction · 0.85
hmgetCommandFunction · 0.85
hdelCommandFunction · 0.85
hlenCommandFunction · 0.85
hstrlenCommandFunction · 0.85
genericHgetallCommandFunction · 0.85
hexistsCommandFunction · 0.85
hscanCommandFunction · 0.85
hrenameCommandFunction · 0.85
hrandfieldCommandFunction · 0.85

Calls 1

addReplyErrorObjectFunction · 0.85

Tested by

no test coverage detected