diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:40:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:40:54 +0000 |
commit | 317c0644ccf108aa23ef3fd8358bd66c2840bfc0 (patch) | |
tree | c417b3d25c86b775989cb5ac042f37611b626c8a /src/commands/bitfield.json | |
parent | Initial commit. (diff) | |
download | redis-317c0644ccf108aa23ef3fd8358bd66c2840bfc0.tar.xz redis-317c0644ccf108aa23ef3fd8358bd66c2840bfc0.zip |
Adding upstream version 5:7.2.4.upstream/5%7.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/commands/bitfield.json')
-rw-r--r-- | src/commands/bitfield.json | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/src/commands/bitfield.json b/src/commands/bitfield.json new file mode 100644 index 0000000..843cea8 --- /dev/null +++ b/src/commands/bitfield.json @@ -0,0 +1,159 @@ +{ + "BITFIELD": { + "summary": "Performs arbitrary bitfield integer operations on strings.", + "complexity": "O(1) for each subcommand specified", + "group": "bitmap", + "since": "3.2.0", + "arity": -2, + "function": "bitfieldCommand", + "get_keys_function": "bitfieldGetKeys", + "command_flags": [ + "WRITE", + "DENYOOM" + ], + "acl_categories": [ + "BITMAP" + ], + "key_specs": [ + { + "notes": "This command allows both access and modification of the key", + "flags": [ + "RW", + "UPDATE", + "ACCESS", + "VARIABLE_FLAGS" + ], + "begin_search": { + "index": { + "pos": 1 + } + }, + "find_keys": { + "range": { + "lastkey": 0, + "step": 1, + "limit": 0 + } + } + } + ], + "arguments": [ + { + "name": "key", + "type": "key", + "key_spec_index": 0 + }, + { + "name": "operation", + "type": "oneof", + "multiple": true, + "optional": true, + "arguments": [ + { + "token": "GET", + "name": "get-block", + "type": "block", + "arguments": [ + { + "name": "encoding", + "type": "string" + }, + { + "name": "offset", + "type": "integer" + } + ] + }, + { + "name": "write", + "type": "block", + "arguments": [ + { + "token": "OVERFLOW", + "name": "overflow-block", + "type": "oneof", + "optional": true, + "arguments": [ + { + "name": "wrap", + "type": "pure-token", + "token": "WRAP" + }, + { + "name": "sat", + "type": "pure-token", + "token": "SAT" + }, + { + "name": "fail", + "type": "pure-token", + "token": "FAIL" + } + ] + }, + { + "name": "write-operation", + "type": "oneof", + "arguments": [ + { + "token": "SET", + "name": "set-block", + "type": "block", + "arguments": [ + { + "name": "encoding", + "type": "string" + }, + { + "name": "offset", + "type": "integer" + }, + { + "name": "value", + "type": "integer" + } + ] + }, + { + "token": "INCRBY", + "name": "incrby-block", + "type": "block", + "arguments": [ + { + "name": "encoding", + "type": "string" + }, + { + "name": "offset", + "type": "integer" + }, + { + "name": "increment", + "type": "integer" + } + ] + } + ] + } + ] + } + ] + } + ], + "reply_schema": { + "type": "array", + "items": { + "oneOf": [ + { + "description": "The result of the subcommand at the same position", + "type": "integer" + }, + { + "description": "In case OVERFLOW FAIL was given and overflows or underflows detected", + "type": "null" + } + ] + } + } + } +} |