Skip to content
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

Merged
merged 13 commits into from
Apr 10, 2022
Merged

Support LMOVE #2065

merged 13 commits into from
Apr 10, 2022

Conversation

Avital-Fine
Copy link
Contributor

Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I left comments inline - note that #2041 is a major change we wanted to get in before tons of PRs here (per #2055) and will make merging a bit difficult. I wanted to throw a note in here in case unaware. I'll do me best to help merge main into these after NRTs lands.

src/StackExchange.Redis/Interfaces/IDatabase.cs Outdated Show resolved Hide resolved
src/StackExchange.Redis/Interfaces/IDatabase.cs Outdated Show resolved Hide resolved
src/StackExchange.Redis/Interfaces/IDatabase.cs Outdated Show resolved Hide resolved
src/StackExchange.Redis/RedisDatabase.cs Outdated Show resolved Hide resolved
src/StackExchange.Redis/RedisDatabase.cs Outdated Show resolved Hide resolved
tests/StackExchange.Redis.Tests/Lists.cs Outdated Show resolved Hide resolved
tests/StackExchange.Redis.Tests/Lists.cs Outdated Show resolved Hide resolved
@NickCraver
Copy link
Collaborator

@Avital-Fine for tests, check out the format Skip.IfMissingFeature(conn, nameof(RedisFeatures.PushMultiple), f => f.PushMultiple); - we need to so similar for LMOVE there for testing against older servers :)

@Avital-Fine
Copy link
Contributor Author

Thanks for this! I left comments inline - note that #2041 is a major change we wanted to get in before tons of PRs here (per #2055) and will make merging a bit difficult. I wanted to throw a note in here in case unaware. I'll do me best to help merge main into these after NRTs lands.

Thank you! hope the merge won't be too bad 😅

Copy link
Collaborator

@NickCraver NickCraver left a 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");
Copy link
Collaborator

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 :)

src/StackExchange.Redis/RedisFeatures.cs Outdated Show resolved Hide resolved
@@ -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();
Copy link
Collaborator

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure!

Copy link
Collaborator

@slorello89 slorello89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Collaborator

@NickCraver NickCraver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looking good

@NickCraver NickCraver merged commit 35fab74 into StackExchange:main Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants