Returns a name of a random key, or NULL if current db is empty. */
| 2522 | |
| 2523 | /* Returns a name of a random key, or NULL if current db is empty. */ |
| 2524 | RedisModuleString *RM_RandomKey(RedisModuleCtx *ctx) { |
| 2525 | robj *key = dbRandomKey(ctx->client->db); |
| 2526 | autoMemoryAdd(ctx,REDISMODULE_AM_STRING,key); |
| 2527 | return key; |
| 2528 | } |
| 2529 | |
| 2530 | /* -------------------------------------------------------------------------- |
| 2531 | * ## Key API for String type |
nothing calls this directly
no test coverage detected