summaryrefslogtreecommitdiffstats
path: root/src/commands/migrate.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:40:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:40:54 +0000
commit317c0644ccf108aa23ef3fd8358bd66c2840bfc0 (patch)
treec417b3d25c86b775989cb5ac042f37611b626c8a /src/commands/migrate.json
parentInitial commit. (diff)
downloadredis-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 '')
-rw-r--r--src/commands/migrate.json181
1 files changed, 181 insertions, 0 deletions
diff --git a/src/commands/migrate.json b/src/commands/migrate.json
new file mode 100644
index 0000000..f1dfae4
--- /dev/null
+++ b/src/commands/migrate.json
@@ -0,0 +1,181 @@
+{
+ "MIGRATE": {
+ "summary": "Atomically transfers a key from one Redis instance to another.",
+ "complexity": "This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.",
+ "group": "generic",
+ "since": "2.6.0",
+ "arity": -6,
+ "function": "migrateCommand",
+ "get_keys_function": "migrateGetKeys",
+ "history": [
+ [
+ "3.0.0",
+ "Added the `COPY` and `REPLACE` options."
+ ],
+ [
+ "3.0.6",
+ "Added the `KEYS` option."
+ ],
+ [
+ "4.0.7",
+ "Added the `AUTH` option."
+ ],
+ [
+ "6.0.0",
+ "Added the `AUTH2` option."
+ ]
+ ],
+ "command_flags": [
+ "WRITE"
+ ],
+ "acl_categories": [
+ "KEYSPACE",
+ "DANGEROUS"
+ ],
+ "command_tips": [
+ "NONDETERMINISTIC_OUTPUT"
+ ],
+ "key_specs": [
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE"
+ ],
+ "begin_search": {
+ "index": {
+ "pos": 3
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": 0,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ },
+ {
+ "flags": [
+ "RW",
+ "ACCESS",
+ "DELETE",
+ "INCOMPLETE"
+ ],
+ "begin_search": {
+ "keyword": {
+ "keyword": "KEYS",
+ "startfrom": -2
+ }
+ },
+ "find_keys": {
+ "range": {
+ "lastkey": -1,
+ "step": 1,
+ "limit": 0
+ }
+ }
+ }
+ ],
+ "reply_schema": {
+ "oneOf": [
+ {
+ "const": "OK",
+ "description": "Success."
+ },
+ {
+ "const": "NOKEY",
+ "description": "No keys were found in the source instance."
+ }
+ ]
+ },
+ "arguments": [
+ {
+ "name": "host",
+ "type": "string"
+ },
+ {
+ "name": "port",
+ "type": "integer"
+ },
+ {
+ "name": "key-selector",
+ "type": "oneof",
+ "arguments": [
+ {
+ "name": "key",
+ "type": "key",
+ "key_spec_index": 0
+ },
+ {
+ "name": "empty-string",
+ "type": "pure-token",
+ "token": "\"\""
+ }
+ ]
+ },
+ {
+ "name": "destination-db",
+ "type": "integer"
+ },
+ {
+ "name": "timeout",
+ "type": "integer"
+ },
+ {
+ "name": "copy",
+ "token": "COPY",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.0"
+ },
+ {
+ "name": "replace",
+ "token": "REPLACE",
+ "type": "pure-token",
+ "optional": true,
+ "since": "3.0.0"
+ },
+ {
+ "name": "authentication",
+ "type": "oneof",
+ "optional": true,
+ "arguments": [
+ {
+ "token": "AUTH",
+ "name": "auth",
+ "display": "password",
+ "type": "string",
+ "since": "4.0.7"
+ },
+ {
+ "token": "AUTH2",
+ "name": "auth2",
+ "type": "block",
+ "since": "6.0.0",
+ "arguments": [
+ {
+ "name": "username",
+ "type": "string"
+ },
+ {
+ "name": "password",
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "token": "KEYS",
+ "name": "keys",
+ "display": "key",
+ "type": "key",
+ "key_spec_index": 1,
+ "optional": true,
+ "multiple": true,
+ "since": "3.0.6"
+ }
+ ]
+ }
+}