Support BYTE|BIT in BITCOUNT and BITPOS commands by Avital-Fine · Pull Request #2116 · StackExchange/StackExchange.Redis (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation25 Commits21 Checks0 Files changed
Conversation
This file contains hidden or 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
[ Show hidden characters]({{ revealButtonHref }})
The new features were added to Redis 7: now the indexes of both commands (BITCOUNT and BITPOS) can be specified in BITs instead of BYTEs.
(Also added tests for BitPosition since it was missing)
In this case, I'd guess we want an overload, e.g. with StringIndexType.Bit/Byte (defaulting to Byte) before CommandFlags - thoughts?
In this case, I'd guess we want an overload, e.g. with
StringIndexType.Bit/Byte(defaulting toByte) beforeCommandFlags- thoughts?
Yes, I was considering that but we can't make a default if we overload.
@NickCraver I can do overload without a default if you think it's better
We can do with a default, we just need to make sure not to break the old method - see #2098 where I'm doing a setup to ensure it's not broken by testing all overload options someone could be using - we'd want to do the same here. You could merge that PR branch in here and point this PR at that branch instead of main, since it'll merge first and has the test clas in place and such.
Avital-Fine and others added 5 commits
Avital-Fine and others added 4 commits
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty tried to give this a good pass. Sorry time isn't on my side this week, but this is looking great - just about good to go :)
Co-authored-by: Nick Craver nrcraver@gmail.com
Co-authored-by: Nick Craver nrcraver@gmail.com
Co-authored-by: Nick Craver nrcraver@gmail.com
Co-authored-by: Nick Craver nrcraver@gmail.com
Co-authored-by: Nick Craver nrcraver@gmail.com
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking awesome - thank you for the tweaks and compat checks!