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

Function getGenericCommand

src/t_string.cpp:292–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292int getGenericCommand(client *c) {
293 robj_roptr o;
294 AeLocker locker;
295
296 if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.null[c->resp],locker)) == nullptr)
297 return C_OK;
298
299 if (checkType(c,o,OBJ_STRING)) {
300 return C_ERR;
301 }
302
303 addReplyBulk(c,o);
304 return C_OK;
305}
306
307void getCommand(client *c) {
308 getGenericCommand(c);

Callers 4

setGenericCommandFunction · 0.85
getCommandFunction · 0.85
getdelCommandFunction · 0.85
getsetCommandFunction · 0.85

Calls 3

lookupKeyReadOrReplyFunction · 0.85
checkTypeFunction · 0.85
addReplyBulkFunction · 0.85

Tested by

no test coverage detected