From 317c0644ccf108aa23ef3fd8358bd66c2840bfc0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:40:54 +0200 Subject: Adding upstream version 5:7.2.4. Signed-off-by: Daniel Baumann --- src/commands/migrate.json | 181 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 src/commands/migrate.json (limited to 'src/commands/migrate.json') 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" + } + ] + } +} -- cgit v1.2.3