-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support LMOVE #2065
Support LMOVE #2065
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Nick Craver <nrcraver@gmail.com>
Co-authored-by: Nick Craver <nrcraver@gmail.com>
@Avital-Fine for tests, check out the format |
Co-authored-by: Nick Craver <nrcraver@gmail.com>
Thank you! hope the merge won't be too bad 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few tweaks/removals then I think we're good to go - thanks for this!
@@ -1009,6 +1009,18 @@ public Task<long> ListLengthAsync(RedisKey key, CommandFlags flags = CommandFlag | |||
return ExecuteAsync(msg, ResultProcessor.Int64); | |||
} | |||
|
|||
public RedisValue ListMove(RedisKey sourceKey, RedisKey destinationKey, ListSide whereFrom, ListSide whereTo, CommandFlags flags = CommandFlags.None) | |||
{ | |||
var msg = Message.Create(Database, flags, RedisCommand.LMOVE, sourceKey, destinationKey, whereFrom == ListSide.Left ? "Left" : "right", whereTo == ListSide.Left ? "Left" : "right"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be consistent in Left vs right here :)
@@ -298,7 +298,7 @@ public async Task ListRightPushAsyncMultipleToExisitingKey() | |||
{ | |||
Skip.IfMissingFeature(conn, nameof(RedisFeatures.PushMultiple), f => f.PushMultiple); | |||
var db = conn.GetDatabase(); | |||
RedisKey key = "testlist"; | |||
RedisKey key = Me(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these fixes btw!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looking good
https://redis.io/commands/lmove/