Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
582 changes: 582 additions & 0 deletions data/command-api-mapping.json

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions data/command-api-mapping/JSON.ARRAPPEND.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,37 @@
"description": "The array length after the append operation."
}
}
],
"redis_rb": [
{
"signature": "json_arrappend(key, path, *values, raw: false)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "a JSONPath to the target array"
},
{
"name": "*values",
"type": "Array<Object>",
"description": "one or more JSON values to append"
},
{
"name": "raw",
"type": "Boolean",
"description": "treat each value as an already-encoded JSON string"
}
],
"returns": {
"type": "Array<Integer>, Integer",
"description": "the new array length(s); an Array for a JSONPath, a single Integer for a legacy path (nil for a match that is not an array)"
}
}
]
}
}
41 changes: 41 additions & 0 deletions data/command-api-mapping/JSON.ARRINDEX.json
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,47 @@
"description": "The index of the first matching element in the requested range."
}
}
],
"redis_rb": [
{
"signature": "json_arrindex(key, path, value, start: nil, stop: nil, raw: false)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "a JSONPath to the target array"
},
{
"name": "value",
"type": "Object",
"description": "the scalar JSON value to search for"
},
{
"name": "start",
"type": "Integer",
"description": "optional inclusive start index"
},
{
"name": "stop",
"type": "Integer",
"description": "optional exclusive stop index"
},
{
"name": "raw",
"type": "Boolean",
"description": "treat value as an already-encoded JSON string"
}
],
"returns": {
"type": "Array<Integer>, Integer",
"description": "the index/indices of the first match (-1 if not found)"
}
}
]
}
}
36 changes: 36 additions & 0 deletions data/command-api-mapping/JSON.ARRINSERT.json
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,42 @@
"description": "The array length after the insert operation."
}
}
],
"redis_rb": [
{
"signature": "json_arrinsert(key, path, index, *values, raw: false)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "a JSONPath to the target array"
},
{
"name": "index",
"type": "Integer",
"description": "the position to insert before"
},
{
"name": "*values",
"type": "Array<Object>",
"description": "one or more JSON values to insert"
},
{
"name": "raw",
"type": "Boolean",
"description": "treat each value as an already-encoded JSON string"
}
],
"returns": {
"type": "Array<Integer>, Integer",
"description": "the new array length(s)"
}
}
]
}
}
21 changes: 21 additions & 0 deletions data/command-api-mapping/JSON.ARRLEN.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,27 @@
"description": "The length of the JSON array at the requested path."
}
}
],
"redis_rb": [
{
"signature": "json_arrlen(key, path = nil)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "an optional JSONPath (defaults to the root \"$\")"
}
],
"returns": {
"type": "Array<Integer>, Integer, nil",
"description": "the array length(s); nil for a match that is not an array, or when the key/path does not exist"
}
}
]
}
}
31 changes: 31 additions & 0 deletions data/command-api-mapping/JSON.ARRPOP.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,37 @@
"description": "The removed JSON element."
}
}
],
"redis_rb": [
{
"signature": "json_arrpop(key, path = nil, index = nil, raw: false)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "an optional JSONPath to the target array (defaults to the root \"$\")"
},
{
"name": "index",
"type": "Integer",
"description": "an optional position to pop from (defaults to -1, the last element)"
},
{
"name": "raw",
"type": "Boolean",
"description": "return the unparsed JSON string(s) instead of parsed Ruby objects"
}
],
"returns": {
"type": "Array, Object, nil",
"description": "the popped value(s); an Array for a JSONPath, a single value for a legacy path, nil for an empty array or a non-array match"
}
}
]
}
}
31 changes: 31 additions & 0 deletions data/command-api-mapping/JSON.ARRTRIM.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,37 @@
"description": "The length of the array after trimming."
}
}
],
"redis_rb": [
{
"signature": "json_arrtrim(key, path, start, stop)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "a JSONPath to the target array"
},
{
"name": "start",
"type": "Integer",
"description": "inclusive index of the first element to keep"
},
{
"name": "stop",
"type": "Integer",
"description": "inclusive index of the last element to keep"
}
],
"returns": {
"type": "Array<Integer>, Integer",
"description": "the new array length(s)"
}
}
]
}
}
21 changes: 21 additions & 0 deletions data/command-api-mapping/JSON.CLEAR.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,27 @@
"description": "The number of values cleared."
}
}
],
"redis_rb": [
{
"signature": "json_clear(key, path = nil)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "an optional JSONPath (defaults to the root \"$\")"
}
],
"returns": {
"type": "Integer",
"description": "the number of values cleared"
}
}
]
}
}
21 changes: 21 additions & 0 deletions data/command-api-mapping/JSON.DEBUG MEMORY.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,27 @@
"description": ""
}
}
],
"redis_rb": [
{
"signature": "json_debug_memory(key, path = nil)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "an optional JSONPath (defaults to the root)"
}
],
"returns": {
"type": "Array<Integer>, Integer",
"description": "the size(s) in bytes: an Array for a JSONPath, a single integer for a legacy path or when no path is given (0 for a missing key)"
}
}
]
}
}
21 changes: 21 additions & 0 deletions data/command-api-mapping/JSON.DEL.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,27 @@
"description": "The number of paths deleted."
}
}
],
"redis_rb": [
{
"signature": "json_del(key, path = nil)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "an optional JSONPath (defaults to the root \"$\")"
}
],
"returns": {
"type": "Integer",
"description": "the number of values deleted"
}
}
]
}
}
21 changes: 21 additions & 0 deletions data/command-api-mapping/JSON.FORGET.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,27 @@
"description": ""
}
}
],
"redis_rb": [
{
"signature": "json_forget(key, path = nil)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "path",
"type": "String",
"description": "an optional JSONPath (defaults to the root \"$\")"
}
],
"returns": {
"type": "Integer",
"description": "the number of values deleted (alias of json_del)"
}
}
]
}
}
26 changes: 26 additions & 0 deletions data/command-api-mapping/JSON.GET.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,32 @@
"description": "The JSON value at the requested path."
}
}
],
"redis_rb": [
{
"signature": "json_get(key, *paths, raw: false)",
"params": [
{
"name": "key",
"type": "String",
"description": ""
},
{
"name": "*paths",
"type": "Array<String>",
"description": "zero or more JSONPath expressions; with none the whole document is returned"
},
{
"name": "raw",
"type": "Boolean",
"description": "return the unparsed JSON string instead of a parsed Ruby object"
}
],
"returns": {
"type": "Object, String, nil",
"description": "the parsed JSON value (or the raw JSON string when raw is true), or nil if the key does not exist"
}
}
]
}
}
Loading
Loading