-
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
ZMPOP and LMPOP #2094
Merged
Merged
ZMPOP and LMPOP #2094
Changes from 16 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8d6de09
Adding ZMPOP and LMPOP
slorello89 48c25bc
merge conflicts
slorello89 17749fc
trying to reset whitespace changes
slorello89 1bd5b8b
removing new() syntax
slorello89 fcf8642
reverting whitespace addition to csproj
slorello89 916240b
nick's comment updates
slorello89 8db54f8
adding Null values for newly renamed ListEntries and SortedSetEntries
slorello89 2818e06
possible solution for key-conflict?
slorello89 872742d
Docs/tweaks
NickCraver 924218d
Merge branch 'main' into feature/ZMPOP
NickCraver aeba2a8
Simplify tests
NickCraver 63e6679
SortedSetEntries -> SortedSetPopResult ListEntries -> ListPopResult
slorello89 321b1fe
Docs and ordering
NickCraver 7716091
Null value updates for the .Null case
NickCraver 6d48c1a
Simplify the procesorrrrrrrrrrrrs
NickCraver aca1da0
Optimize harder
NickCraver 19d69d3
Merge remote-tracking branch 'origin/main' into feature/ZMPOP
NickCraver d6378dd
Add release notes
NickCraver 0a6f154
Grammar, lest Elise kills me in my sleep
NickCraver 88810ed
Simplify descriptions
NickCraver fd8db50
Must was so angry.
NickCraver a6ef27b
Test tweaks
NickCraver 2991bd8
Tests: remove additional LINQ (makes tests more specific too)
NickCraver 0779e45
SortedSets: de-LINQ
NickCraver be67266
Optimize SortedSet tests
NickCraver e682f33
Use \Results folder
NickCraver d7726ce
Results -> API types
NickCraver 717dd6f
Merge remote-tracking branch 'origin/main' into feature/ZMPOP
NickCraver a8e435e
Merge remote-tracking branch 'origin/main' into feature/ZMPOP
NickCraver 0e26598
Merge remote-tracking branch 'origin/main' into feature/ZMPOP
NickCraver File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
|
||
namespace StackExchange.Redis; | ||
|
||
/// <summary> | ||
/// A contiguous portion of a redis list. | ||
/// </summary> | ||
public readonly struct ListPopResult | ||
{ | ||
/// <summary> | ||
/// A null ListPopResult, indicating no results. | ||
/// </summary> | ||
public static ListPopResult Null { get; } = new ListPopResult(RedisKey.Null, Array.Empty<RedisValue>()); | ||
|
||
/// <summary> | ||
/// Whether this object is null/empty. | ||
/// </summary> | ||
public bool IsNull => Key.IsNull && Values == Array.Empty<RedisValue>(); | ||
|
||
/// <summary> | ||
/// The key of the list that this set of entries came form. | ||
/// </summary> | ||
public RedisKey Key { get; } | ||
|
||
/// <summary> | ||
/// The values from the list. | ||
/// </summary> | ||
public RedisValue[] Values { get; } | ||
|
||
internal ListPopResult(RedisKey key, RedisValue[] values) | ||
{ | ||
Key = key; | ||
Values = values; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@slorello89 Does this matter? e.g. is it equally correct and maybe clearer to simplify to:
...or is that more confusing and/or plain wrong?
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.
The important point is that the first list it encounters is what it pops elements out of. Both ways of phrasing it get at that point so whichever is simpler.
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.
kk - to me it's confusing currently - will adjust, can always change again!