Skip to content

Conversation

@jihuayu
Copy link
Member

@jihuayu jihuayu commented Dec 16, 2023

closed #1925

In this PR, I have added support for KEEPTLE and GET options in the SET command.
I have also updated the GETSET, SETEX, SETNX, and SETXX commands to use the new set function.

By the way, I have a question about when to use std::optional<std::string>& and when to use std::string*?
I think that both options are equivalent, but using std::optional<std::string>& can help avoid null in the code.
So I have used std::optional<std::string>& in my code.

Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

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

Overall is good, thanks for your contribution.

@git-hulk git-hulk requested a review from PragmaTwice December 17, 2023 08:45
git-hulk
git-hulk previously approved these changes Dec 17, 2023
enjoy-binbin
enjoy-binbin previously approved these changes Dec 18, 2023
@jihuayu jihuayu dismissed stale reviews from enjoy-binbin and git-hulk via 888e0ca December 18, 2023 03:32
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@git-hulk git-hulk merged commit 64e7834 into apache:unstable Dec 18, 2023
@jihuayu jihuayu deleted the f/1212-set branch December 18, 2023 22:36
@jihuayu
Copy link
Member Author

jihuayu commented Dec 20, 2023

@git-hulk Maybe we need to add a note to the documentation, telling users that the next version(2.8)supports the SET option with KEEPTLE and GET options?

@git-hulk
Copy link
Member

@jihuayu Sure, thank you!

@enjoy-binbin
Copy link
Member

It feels like it could also be included in #1929 and done together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set command supports NX and GET options used together

4 participants