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

Function memoryGetKeys

src/db.cpp:2404–2415  ·  view source on GitHub ↗

Helper function to extract keys from memory command. * MEMORY USAGE */

Source from the content-addressed store, hash-verified

2402/* Helper function to extract keys from memory command.
2403 * MEMORY USAGE <key> */
2404int memoryGetKeys(struct redisCommand *cmd, robj **argv, int argc, getKeysResult *result) {
2405 UNUSED(cmd);
2406
2407 getKeysPrepareResult(result, 1);
2408 if (argc >= 3 && !strcasecmp(szFromObj(argv[1]),"usage")) {
2409 result->keys[0] = 2;
2410 result->numkeys = 1;
2411 return result->numkeys;
2412 }
2413 result->numkeys = 0;
2414 return 0;
2415}
2416
2417/* XREAD [BLOCK <milliseconds>] [COUNT <count>] [GROUP <groupname> <ttl>]
2418 * STREAMS key_1 key_2 ... key_N ID_1 ID_2 ... ID_N */

Callers

nothing calls this directly

Calls 2

getKeysPrepareResultFunction · 0.85
szFromObjFunction · 0.85

Tested by

no test coverage detected