Skip to content

Add GET parameter to SET command#7852

Merged
oranagra merged 1 commit intoredis:unstablefrom
nykolaslima:add-get-parameter-to-set
Oct 2, 2020
Merged

Add GET parameter to SET command#7852
oranagra merged 1 commit intoredis:unstablefrom
nykolaslima:add-get-parameter-to-set

Conversation

@nykolaslima
Copy link
Contributor

Closes #2349

Add optional GET parameter to SET command in order to set a new value to
a key and retrieve the old key value. With this change we can deprecate
GETSET command and use only the SET command with the GET parameter.

@oranagra

Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

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

these tests are so simple and fast, let's also add a test for XX and EX.

Can you please also make a PR for redis-doc?
mark it as starting redis 6.2, and mark GETSET as deprecated the same way HMSET is marked.

@nykolaslima nykolaslima force-pushed the add-get-parameter-to-set branch 3 times, most recently from fb77574 to a9b0572 Compare September 29, 2020 18:29
@nykolaslima
Copy link
Contributor Author

nykolaslima commented Sep 29, 2020

@oranagra I just resolved the comments and also opened a PR into redis-doc

Closes redis#2349

Add optional GET parameter to SET command in order to set a new value to
a key and retrieve the old key value. With this change we can deprecate
`GETSET` command and use only the SET command with the GET parameter.
@nykolaslima nykolaslima force-pushed the add-get-parameter-to-set branch from a9b0572 to 6094b42 Compare September 29, 2020 20:37
@nykolaslima
Copy link
Contributor Author

@oranagra any other comments on this? I believe we're good to go.

@oranagra
Copy link
Member

@redis/core-team please approve

@oranagra oranagra merged commit 66ee45b into redis:unstable Oct 2, 2020
@nykolaslima nykolaslima deleted the add-get-parameter-to-set branch October 2, 2020 12:18
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 4, 2020
Add optional GET parameter to SET command in order to set a new value to
a key and retrieve the old key value. With this change we can deprecate
`GETSET` command and use only the SET command with the GET parameter.
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label Dec 9, 2020
@oranagra oranagra mentioned this pull request Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

To support TTL parameter in GETSET command as well as in SET command

4 participants