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

Function randomkeyCommand

src/db.cpp:951–961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951void randomkeyCommand(client *c) {
952 robj *key;
953
954 if ((key = dbRandomKey(c->db)) == NULL) {
955 addReplyNull(c);
956 return;
957 }
958
959 addReplyBulk(c,key);
960 decrRefCount(key);
961}
962
963bool redisDbPersistentData::iterate(std::function<bool(const char*, robj*)> fn)
964{

Callers

nothing calls this directly

Calls 4

dbRandomKeyFunction · 0.85
addReplyNullFunction · 0.85
addReplyBulkFunction · 0.85
decrRefCountFunction · 0.85

Tested by

no test coverage detected