MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hmgetCommand

Function hmgetCommand

app/redis-6.2.6/src/t_hash.c:815–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected