Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit efc73f1

Browse files
committed
Merge pull request #204 from gregoryb/master
Added the key as argument of the migrate command.
2 parents bc01f23 + 84a5c70 commit efc73f1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ServiceStack.Redis/RedisNativeClient.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,12 @@ public byte[] Restore(string key, long expireMs, byte[] dumpValue)
322322
return SendExpectData(Commands.Restore, key.ToUtf8Bytes(), expireMs.ToUtf8Bytes(), dumpValue);
323323
}
324324

325-
public void Migrate(string host, int port, int destinationDb, long timeoutMs)
325+
public void Migrate(string host, int port, string key, int destinationDb, long timeoutMs)
326326
{
327-
SendExpectSuccess(Commands.Migrate, host.ToUtf8Bytes(), port.ToUtf8Bytes(), destinationDb.ToUtf8Bytes(), timeoutMs.ToUtf8Bytes());
327+
if (key == null)
328+
throw new ArgumentNullException("key");
329+
330+
SendExpectSuccess(Commands.Migrate, host.ToUtf8Bytes(), port.ToUtf8Bytes(), key.ToUtf8Bytes(), destinationDb.ToUtf8Bytes(), timeoutMs.ToUtf8Bytes());
328331
}
329332

330333
public bool Move(string key, int db)

0 commit comments

Comments
 (0)