summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/src/commands/getex.json
diff options
context:
space:
mode:
Diffstat (limited to 'examples/redis-unstable/src/commands/getex.json')
-rw-r--r--examples/redis-unstable/src/commands/getex.json90
1 files changed, 90 insertions, 0 deletions
diff --git a/examples/redis-unstable/src/commands/getex.json b/examples/redis-unstable/src/commands/getex.json
new file mode 100644
index 0000000..978b9d1
--- /dev/null
+++ b/examples/redis-unstable/src/commands/getex.json
@@ -0,0 +1,90 @@
1{
2 "GETEX": {
3 "summary": "Returns the string value of a key after setting its expiration time.",
4 "complexity": "O(1)",
5 "group": "string",
6 "since": "6.2.0",
7 "arity": -2,
8 "function": "getexCommand",
9 "command_flags": [
10 "WRITE",
11 "FAST"
12 ],
13 "acl_categories": [
14 "STRING"
15 ],
16 "key_specs": [
17 {
18 "notes": "RW and UPDATE because it changes the TTL",
19 "flags": [
20 "RW",
21 "ACCESS",
22 "UPDATE"
23 ],
24 "begin_search": {
25 "index": {
26 "pos": 1
27 }
28 },
29 "find_keys": {
30 "range": {
31 "lastkey": 0,
32 "step": 1,
33 "limit": 0
34 }
35 }
36 }
37 ],
38 "reply_schema": {
39 "oneOf": [
40 {
41 "description": "The value of the key.",
42 "type": "string"
43 },
44 {
45 "description": "Key does not exist.",
46 "type": "null"
47 }
48 ]
49 },
50 "arguments": [
51 {
52 "name": "key",
53 "type": "key",
54 "key_spec_index": 0
55 },
56 {
57 "name": "expiration",
58 "type": "oneof",
59 "optional": true,
60 "arguments": [
61 {
62 "name": "seconds",
63 "type": "integer",
64 "token": "EX"
65 },
66 {
67 "name": "milliseconds",
68 "type": "integer",
69 "token": "PX"
70 },
71 {
72 "name": "unix-time-seconds",
73 "type": "unix-time",
74 "token": "EXAT"
75 },
76 {
77 "name": "unix-time-milliseconds",
78 "type": "unix-time",
79 "token": "PXAT"
80 },
81 {
82 "name": "persist",
83 "type": "pure-token",
84 "token": "PERSIST"
85 }
86 ]
87 }
88 ]
89 }
90}