Support for new HGETDEL, HGETEX and HSETEX commands
This PR adds support for new Redis Hash Commands;
- HGETDEL Get and delete the value of one or more fields of a given hash key
HGETDEL <key> FIELDS <numfields> field [field ...]
- HGETEX Get the value of one or more fields of a given hash key, and optionally set their expiration
HGETEX <key>
[EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | PERSIST]
FIELDS <numfields> field [field ...]
- HSETEX Set the value of one or more fields of a given hash key, and optionally set their expiration
HSETEX <key>
[FNX | FXX]
[EX seconds | PX milliseconds | EXAT unix-time-seconds | PXAT unix-time-milliseconds | KEEPTTL]
FIELDS <numfields> field value [field value...]
Here the implementation consist of sync and async API s for those commands with adding Lease versions of them when useful.
- HashFieldGetAndDelete
- HashFieldGetAndSetExpiry
- HashFieldSetAndSetExpiry
For more details on commands 👉redis/redis#13798 Redis release including new hash commands 👉https://github.com/redis/redis/releases/tag/8.0-m04
isn't it duplicate to https://github.com/redis/redis/pull/13577 ? my code has conflict with this @sund. https://github.com/redis/redis/pull/13577 has been reviewed as well
@samanebi ohh, sorry, now this PR is the subset of #13798, we should have set you as the coauther of another PR, so sorry for you.
@samanebi ohh, sorry, now this PR is the subset of #13798, we should have set you as the coauther of another PR, so sorry for you.
It is sad to hear that. thanks for putting me as coauthor of another PR. please let me know about that. thanks
@mgravell @NickCraver , i guess there is flaky test showing up with failed tests: DisconnectAndNoReconnectThrowsConnectionExceptionAsync
also kind reminder for the PR..
Hi gents, the PR is pretty old now but I guess there is a good amount of folks here interested in the support of these commands with the new REDIS V8 release Is this PR still relevant or needs to be re-written as we speak ? cheers
I'm currently very much in a "Redis" mode (although I'm focusing on a memory thing right now); I will evaluate this in the coming week (public holiday for the UK today)
I'll take care of the drift/merge, but I might tweak some naming for consistency with the String* twins. In particular (using the names from this PR):
- HGETEX,
- HashFieldGetAndSetExpiry vs StringGetSetExpiry
- HGETDEL,
- HashFieldGetAndDelete vs StringGetDelete
- HashFieldGetLeaseAndDelete vs (no twin)
- HSETEX,
- HashFieldSetAndSetExpiry vs StringSet (with additional args)
more thinking; I think I'll leave the And - we use that other places, think GetSearchAndStore, StreamAcknowledgeAndDelete
Still thinking about the AndSetExpiry - overload would seem preferable there
ping @NickCraver @philon-msft for visibility on https://github.com/StackExchange/StackExchange.Redis/pull/2863/commits/1817d93d82228b9d8f0867513e4465984c5ed9be, in particular because of the pre-existing missing usage in
-
SetIntersectionLength -
SortedSetCombine -
SortedSetCombineWithScores -
SortedSetIntersectionLength
I'll call these out on the release notes, and probably worth a "minor" bump