diff options
Diffstat (limited to 'examples/redis-unstable/src/commands/xadd.json')
| -rw-r--r-- | examples/redis-unstable/src/commands/xadd.json | 231 |
1 files changed, 231 insertions, 0 deletions
diff --git a/examples/redis-unstable/src/commands/xadd.json b/examples/redis-unstable/src/commands/xadd.json new file mode 100644 index 0000000..77e6de4 --- /dev/null +++ b/examples/redis-unstable/src/commands/xadd.json | |||
| @@ -0,0 +1,231 @@ | |||
| 1 | { | ||
| 2 | "XADD": { | ||
| 3 | "summary": "Appends a new message to a stream. Creates the key if it doesn't exist.", | ||
| 4 | "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.", | ||
| 5 | "group": "stream", | ||
| 6 | "since": "5.0.0", | ||
| 7 | "arity": -5, | ||
| 8 | "function": "xaddCommand", | ||
| 9 | "history": [ | ||
| 10 | [ | ||
| 11 | "6.2.0", | ||
| 12 | "Added the `NOMKSTREAM` option, `MINID` trimming strategy and the `LIMIT` option." | ||
| 13 | ], | ||
| 14 | [ | ||
| 15 | "7.0.0", | ||
| 16 | "Added support for the `<ms>-*` explicit ID form." | ||
| 17 | ], | ||
| 18 | [ | ||
| 19 | "8.2.0", | ||
| 20 | "Added the `KEEPREF`, `DELREF` and `ACKED` options." | ||
| 21 | ] | ||
| 22 | ], | ||
| 23 | "command_flags": [ | ||
| 24 | "WRITE", | ||
| 25 | "DENYOOM", | ||
| 26 | "FAST" | ||
| 27 | ], | ||
| 28 | "acl_categories": [ | ||
| 29 | "STREAM" | ||
| 30 | ], | ||
| 31 | "command_tips": [ | ||
| 32 | "NONDETERMINISTIC_OUTPUT" | ||
| 33 | ], | ||
| 34 | "key_specs": [ | ||
| 35 | { | ||
| 36 | "notes": "UPDATE instead of INSERT because of the optional trimming feature", | ||
| 37 | "flags": [ | ||
| 38 | "RW", | ||
| 39 | "UPDATE" | ||
| 40 | ], | ||
| 41 | "begin_search": { | ||
| 42 | "index": { | ||
| 43 | "pos": 1 | ||
| 44 | } | ||
| 45 | }, | ||
| 46 | "find_keys": { | ||
| 47 | "range": { | ||
| 48 | "lastkey": 0, | ||
| 49 | "step": 1, | ||
| 50 | "limit": 0 | ||
| 51 | } | ||
| 52 | } | ||
| 53 | } | ||
| 54 | ], | ||
| 55 | "arguments": [ | ||
| 56 | { | ||
| 57 | "name": "key", | ||
| 58 | "type": "key", | ||
| 59 | "key_spec_index": 0 | ||
| 60 | }, | ||
| 61 | { | ||
| 62 | "token": "NOMKSTREAM", | ||
| 63 | "name": "nomkstream", | ||
| 64 | "type": "pure-token", | ||
| 65 | "optional": true, | ||
| 66 | "since": "6.2.0" | ||
| 67 | }, | ||
| 68 | { | ||
| 69 | "name": "condition", | ||
| 70 | "type": "oneof", | ||
| 71 | "optional": true, | ||
| 72 | "arguments": [ | ||
| 73 | { | ||
| 74 | "name": "keepref", | ||
| 75 | "type": "pure-token", | ||
| 76 | "token": "KEEPREF" | ||
| 77 | }, | ||
| 78 | { | ||
| 79 | "name": "delref", | ||
| 80 | "type": "pure-token", | ||
| 81 | "token": "DELREF" | ||
| 82 | }, | ||
| 83 | { | ||
| 84 | "name": "acked", | ||
| 85 | "type": "pure-token", | ||
| 86 | "token": "ACKED" | ||
| 87 | } | ||
| 88 | ] | ||
| 89 | }, | ||
| 90 | { | ||
| 91 | "name": "idmp", | ||
| 92 | "type": "oneof", | ||
| 93 | "optional": true, | ||
| 94 | "arguments": [ | ||
| 95 | { | ||
| 96 | "name": "idmpauto-with-pid", | ||
| 97 | "type": "block", | ||
| 98 | "arguments": [ | ||
| 99 | { | ||
| 100 | "token": "IDMPAUTO", | ||
| 101 | "name": "idmpauto-token", | ||
| 102 | "type": "pure-token" | ||
| 103 | }, | ||
| 104 | { | ||
| 105 | "name": "pid", | ||
| 106 | "type": "string", | ||
| 107 | "display_text": "producer-id" | ||
| 108 | } | ||
| 109 | ] | ||
| 110 | }, | ||
| 111 | { | ||
| 112 | "name": "idmp-with-pid-iid", | ||
| 113 | "type": "block", | ||
| 114 | "arguments": [ | ||
| 115 | { | ||
| 116 | "token": "IDMP", | ||
| 117 | "name": "idmp-token", | ||
| 118 | "type": "pure-token" | ||
| 119 | }, | ||
| 120 | { | ||
| 121 | "name": "pid", | ||
| 122 | "type": "string", | ||
| 123 | "display_text": "producer-id" | ||
| 124 | }, | ||
| 125 | { | ||
| 126 | "name": "iid", | ||
| 127 | "type": "string", | ||
| 128 | "display_text": "idempotent-id" | ||
| 129 | } | ||
| 130 | ] | ||
| 131 | } | ||
| 132 | ] | ||
| 133 | }, | ||
| 134 | { | ||
| 135 | "name": "trim", | ||
| 136 | "type": "block", | ||
| 137 | "optional": true, | ||
| 138 | "arguments": [ | ||
| 139 | { | ||
| 140 | "name": "strategy", | ||
| 141 | "type": "oneof", | ||
| 142 | "arguments": [ | ||
| 143 | { | ||
| 144 | "name": "maxlen", | ||
| 145 | "type": "pure-token", | ||
| 146 | "token": "MAXLEN" | ||
| 147 | }, | ||
| 148 | { | ||
| 149 | "name": "minid", | ||
| 150 | "type": "pure-token", | ||
| 151 | "token": "MINID", | ||
| 152 | "since": "6.2.0" | ||
| 153 | } | ||
| 154 | ] | ||
| 155 | }, | ||
| 156 | { | ||
| 157 | "name": "operator", | ||
| 158 | "type": "oneof", | ||
| 159 | "optional": true, | ||
| 160 | "arguments": [ | ||
| 161 | { | ||
| 162 | "name": "equal", | ||
| 163 | "type": "pure-token", | ||
| 164 | "token": "=" | ||
| 165 | }, | ||
| 166 | { | ||
| 167 | "name": "approximately", | ||
| 168 | "type": "pure-token", | ||
| 169 | "token": "~" | ||
| 170 | } | ||
| 171 | ] | ||
| 172 | }, | ||
| 173 | { | ||
| 174 | "name": "threshold", | ||
| 175 | "type": "string" | ||
| 176 | }, | ||
| 177 | { | ||
| 178 | "token": "LIMIT", | ||
| 179 | "name": "count", | ||
| 180 | "type": "integer", | ||
| 181 | "optional": true, | ||
| 182 | "since": "6.2.0" | ||
| 183 | } | ||
| 184 | ] | ||
| 185 | }, | ||
| 186 | { | ||
| 187 | "name": "id-selector", | ||
| 188 | "type": "oneof", | ||
| 189 | "arguments": [ | ||
| 190 | { | ||
| 191 | "name": "auto-id", | ||
| 192 | "type": "pure-token", | ||
| 193 | "token": "*" | ||
| 194 | }, | ||
| 195 | { | ||
| 196 | "name": "id", | ||
| 197 | "type": "string" | ||
| 198 | } | ||
| 199 | ] | ||
| 200 | }, | ||
| 201 | { | ||
| 202 | "name": "data", | ||
| 203 | "type": "block", | ||
| 204 | "multiple": true, | ||
| 205 | "arguments": [ | ||
| 206 | { | ||
| 207 | "name": "field", | ||
| 208 | "type": "string" | ||
| 209 | }, | ||
| 210 | { | ||
| 211 | "name": "value", | ||
| 212 | "type": "string" | ||
| 213 | } | ||
| 214 | ] | ||
| 215 | } | ||
| 216 | ], | ||
| 217 | "reply_schema": { | ||
| 218 | "oneOf":[ | ||
| 219 | { | ||
| 220 | "description": "The ID of the added entry. The ID is the one auto-generated if * is passed as ID argument, otherwise the command just returns the same ID specified by the user during insertion.", | ||
| 221 | "type": "string", | ||
| 222 | "pattern": "[0-9]+-[0-9]+" | ||
| 223 | }, | ||
| 224 | { | ||
| 225 | "description": "The NOMKSTREAM option is given and the key doesn't exist.", | ||
| 226 | "type": "null" | ||
| 227 | } | ||
| 228 | ] | ||
| 229 | } | ||
| 230 | } | ||
| 231 | } | ||
