forked from valkey-io/valkey-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands_array.json
More file actions
621 lines (621 loc) · 13.4 KB
/
Copy pathcommands_array.json
File metadata and controls
621 lines (621 loc) · 13.4 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
{
"ARCOUNT": {
"summary": "Returns the number of non-empty elements in an array.",
"complexity": "O(1)",
"group": "array",
"since": "8.8.0",
"arity": 2,
"function": "arcountCommand",
"command_flags": [
"READONLY",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
}
]
},
"ARDEL": {
"summary": "Deletes elements at the specified indices in an array.",
"complexity": "O(N) where N is the number of indices to delete",
"group": "array",
"since": "8.8.0",
"arity": -3,
"function": "ardelCommand",
"command_flags": [
"WRITE",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "index",
"type": "integer",
"multiple": true
}
]
},
"ARDELRANGE": {
"summary": "Deletes elements in one or more ranges.",
"complexity": "Proportional to the number of existing elements / slices touched, not to the numeric span of the requested ranges",
"group": "array",
"since": "8.8.0",
"arity": -4,
"function": "ardelrangeCommand",
"command_flags": [
"WRITE"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "range",
"type": "block",
"multiple": true,
"arguments": [
{
"name": "start",
"type": "integer"
},
{
"name": "end",
"type": "integer"
}
]
}
]
},
"ARGET": {
"summary": "Gets the value at an index in an array.",
"complexity": "O(1)",
"group": "array",
"since": "8.8.0",
"arity": 3,
"function": "argetCommand",
"command_flags": [
"READONLY",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "index",
"type": "integer"
}
]
},
"ARGETRANGE": {
"summary": "Gets values in a range of indices.",
"complexity": "O(N) where N is the range length",
"group": "array",
"since": "8.8.0",
"arity": 4,
"function": "argetrangeCommand",
"command_flags": [
"READONLY"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "start",
"type": "integer"
},
{
"name": "end",
"type": "integer"
}
]
},
"ARGREP": {
"summary": "Searches array elements in a range using textual predicates.",
"complexity": "O(P * C) where P is the number of visited positions in touched slices and C is the cost of evaluating the predicates on one existing element.",
"group": "array",
"since": "8.8.0",
"arity": -6,
"function": "argrepCommand",
"command_flags": [
"READONLY"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "start",
"type": "string"
},
{
"name": "end",
"type": "string"
},
{
"name": "predicate",
"type": "oneof",
"multiple": true,
"arguments": [
{
"name": "exact",
"type": "block",
"arguments": [
{
"name": "exact",
"type": "pure-token",
"token": "EXACT"
},
{
"name": "string",
"type": "string"
}
]
},
{
"name": "match",
"type": "block",
"arguments": [
{
"name": "match",
"type": "pure-token",
"token": "MATCH"
},
{
"name": "string",
"type": "string"
}
]
},
{
"name": "glob",
"type": "block",
"arguments": [
{
"name": "glob",
"type": "pure-token",
"token": "GLOB"
},
{
"name": "pattern",
"type": "string"
}
]
},
{
"name": "re",
"type": "block",
"arguments": [
{
"name": "re",
"type": "pure-token",
"token": "RE"
},
{
"name": "pattern",
"type": "string"
}
]
}
]
},
{
"name": "options",
"type": "oneof",
"optional": true,
"multiple": true,
"arguments": [
{
"name": "and",
"type": "pure-token",
"token": "AND"
},
{
"name": "or",
"type": "pure-token",
"token": "OR"
},
{
"name": "limit",
"type": "integer",
"token": "LIMIT"
},
{
"name": "withvalues",
"type": "pure-token",
"token": "WITHVALUES"
},
{
"name": "nocase",
"type": "pure-token",
"token": "NOCASE"
}
]
}
]
},
"ARINFO": {
"summary": "Returns metadata about an array.",
"complexity": "O(1), or O(N) with FULL option where N is the number of slices.",
"group": "array",
"since": "8.8.0",
"arity": -2,
"function": "arinfoCommand",
"command_flags": [
"READONLY"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "full",
"type": "pure-token",
"token": "FULL",
"optional": true
}
]
},
"ARINSERT": {
"summary": "Inserts one or more values at consecutive indices.",
"complexity": "O(N) where N is the number of values",
"group": "array",
"since": "8.8.0",
"arity": -3,
"function": "arinsertCommand",
"command_flags": [
"WRITE",
"DENYOOM",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "value",
"type": "string",
"multiple": true
}
]
},
"ARLASTITEMS": {
"summary": "Returns the most recently inserted elements.",
"complexity": "O(N) where N is the count",
"group": "array",
"since": "8.8.0",
"arity": -3,
"function": "arlastitemsCommand",
"command_flags": [
"READONLY"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "count",
"type": "integer"
},
{
"name": "rev",
"type": "pure-token",
"token": "REV",
"optional": true
}
]
},
"ARLEN": {
"summary": "Returns the length of an array (max index + 1).",
"complexity": "O(1)",
"group": "array",
"since": "8.8.0",
"arity": 2,
"function": "arlenCommand",
"command_flags": [
"READONLY",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
}
]
},
"ARMGET": {
"summary": "Gets values at multiple indices in an array.",
"complexity": "O(N) where N is the number of indices",
"group": "array",
"since": "8.8.0",
"arity": -3,
"function": "armgetCommand",
"command_flags": [
"READONLY",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "index",
"type": "integer",
"multiple": true
}
]
},
"ARMSET": {
"summary": "Sets multiple index-value pairs in an array.",
"complexity": "O(N) where N is the number of pairs",
"group": "array",
"since": "8.8.0",
"arity": -4,
"function": "armsetCommand",
"command_flags": [
"WRITE",
"DENYOOM",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "data",
"type": "block",
"multiple": true,
"arguments": [
{
"name": "index",
"type": "integer"
},
{
"name": "value",
"type": "string"
}
]
}
]
},
"ARNEXT": {
"summary": "Returns the next index ARINSERT would use.",
"complexity": "O(1)",
"group": "array",
"since": "8.8.0",
"arity": 2,
"function": "arnextCommand",
"command_flags": [
"READONLY",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
}
]
},
"AROP": {
"summary": "Performs aggregate operations on array elements in a range.",
"complexity": "O(P) where P is visited positions in touched slices (dense scanned slots + sparse entries), with worst-case O(|end-start|+1) and typical case close to O(N), where N is the number of existing elements in range.",
"group": "array",
"since": "8.8.0",
"arity": -5,
"function": "aropCommand",
"command_flags": [
"READONLY"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "start",
"type": "integer"
},
{
"name": "end",
"type": "integer"
},
{
"name": "operation",
"type": "oneof",
"arguments": [
{
"name": "sum",
"type": "pure-token",
"token": "SUM"
},
{
"name": "min",
"type": "pure-token",
"token": "MIN"
},
{
"name": "max",
"type": "pure-token",
"token": "MAX"
},
{
"name": "and",
"type": "pure-token",
"token": "AND"
},
{
"name": "or",
"type": "pure-token",
"token": "OR"
},
{
"name": "xor",
"type": "pure-token",
"token": "XOR"
},
{
"name": "match",
"type": "block",
"arguments": [
{
"name": "match",
"type": "pure-token",
"token": "MATCH"
},
{
"name": "value",
"type": "string"
}
]
},
{
"name": "used",
"type": "pure-token",
"token": "USED"
}
]
}
]
},
"ARRING": {
"summary": "Inserts values into a ring buffer of specified size, wrapping and truncating as needed.",
"complexity": "O(M) normally, O(N+M) on ring resize, where N is the maximum of the old and new ring size and M is the number of inserted values",
"group": "array",
"since": "8.8.0",
"arity": -4,
"function": "arringCommand",
"command_flags": [
"WRITE",
"DENYOOM"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "size",
"type": "integer"
},
{
"name": "value",
"type": "string",
"multiple": true
}
]
},
"ARSCAN": {
"summary": "Iterates existing elements in a range, returning index-value pairs.",
"complexity": "O(P) where P is visited positions in touched slices (dense scanned slots + sparse entries), with worst-case O(|end-start|+1) and typical case close to O(N), where N is the number of existing elements in range.",
"group": "array",
"since": "8.8.0",
"arity": -4,
"function": "arscanCommand",
"command_flags": [
"READONLY"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "start",
"type": "integer"
},
{
"name": "end",
"type": "integer"
},
{
"name": "limit",
"token": "LIMIT",
"type": "integer",
"optional": true
}
]
},
"ARSEEK": {
"summary": "Sets the ARINSERT / ARRING cursor to a specific index.",
"complexity": "O(1)",
"group": "array",
"since": "8.8.0",
"arity": 3,
"function": "arseekCommand",
"command_flags": [
"WRITE",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "index",
"type": "integer"
}
]
},
"ARSET": {
"summary": "Sets one or more contiguous values starting at an index in an array.",
"complexity": "O(N) where N is the number of values",
"group": "array",
"since": "8.8.0",
"arity": -4,
"function": "arsetCommand",
"command_flags": [
"WRITE",
"DENYOOM",
"FAST"
],
"arguments": [
{
"name": "key",
"type": "key",
"key_spec_index": 0
},
{
"name": "index",
"type": "integer"
},
{
"name": "value",
"type": "string",
"multiple": true
}
]
}
}