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

Function hmgetCommand

src/t_hash.cpp:819–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819void hmgetCommand(client *c) {
820 robj_roptr o;
821 int i;
822 AeLocker locker;
823
824 /* Don't abort when the key cannot be found. Non-existing keys are empty
825 * hashes, where HMGET should respond with a series of null bulks. */
826 o = lookupKeyRead(c->db, c->argv[1], c->mvccCheckpoint, locker);
827 if (checkType(c,o,OBJ_HASH)) return;
828
829 addReplyArrayLen(c, c->argc-2);
830 for (i = 2; i < c->argc; i++) {
831 addHashFieldToReply(c, o, szFromObj(c->argv[i]));
832 }
833}
834
835void hdelCommand(client *c) {
836 robj *o;

Callers

nothing calls this directly

Calls 5

lookupKeyReadFunction · 0.85
checkTypeFunction · 0.85
addReplyArrayLenFunction · 0.85
addHashFieldToReplyFunction · 0.85
szFromObjFunction · 0.85

Tested by

no test coverage detected