summaryrefslogtreecommitdiffstats
path: root/src/commands/lset.json
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/lset.json')
-rw-r--r--src/commands/lset.json55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/commands/lset.json b/src/commands/lset.json
new file mode 100644
index 0000000..473b02c
--- /dev/null
+++ b/src/commands/lset.json
@@ -0,0 +1,55 @@
+{
+ "LSET": {
+ "summary": "Sets the value of an element in a list by its index.",
+ "complexity": "O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).",
+ "group": "list",
+ "since": "1.0.0",
+ "arity": 4,
+ "function": "lsetCommand",
+ "command_flags": [
+ "WRITE",
+ "DENYOOM"
+ ],
+ "acl_categories": [
+ "LIST"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "UPDATE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 1
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "reply_schema": {
+ "const": "OK"
+ },
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "index",
+ "type": "integer"
+ },
+ {
+ "name": "element",
+ "type": "string"
+ }
+ ]
+ }
+}