summaryrefslogtreecommitdiffstats
path: root/src/commands/randomkey.json
blob: eeef61aef1712557d7f9446cbbf2ccd7977cc91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
    "RANDOMKEY": {
        "summary": "Returns a random key name from the database.",
        "complexity": "O(1)",
        "group": "generic",
        "since": "1.0.0",
        "arity": 1,
        "function": "randomkeyCommand",
        "command_flags": [
            "READONLY",
            "TOUCHES_ARBITRARY_KEYS"
        ],
        "acl_categories": [
            "KEYSPACE"
        ],
        "command_tips": [
            "REQUEST_POLICY:ALL_SHARDS",
            "RESPONSE_POLICY:SPECIAL",
            "NONDETERMINISTIC_OUTPUT"
        ],
        "reply_schema": {
            "oneOf": [
                {
                    "description": "when the database is empty",
                    "type": "null"
                },
                {
                    "description": "random key in db",
                    "type": "string"
                }
            ]
        }
    }
}