Skip to content

Support for new HGETDEL, HGETEX and HSETEX commands #2863

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

atakavci
Copy link
Contributor

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

@samanebi
Copy link

samanebi commented Apr 22, 2025

isn't it duplicate to redis/redis#13577 ? my code has conflict with this @sund. redis/redis#13577 has been reviewed as well

@sundb
Copy link

sundb commented Apr 22, 2025

@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
Copy link

@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

@atakavci
Copy link
Contributor Author

@mgravell @NickCraver , i guess there is flaky test showing up with failed tests: DisconnectAndNoReconnectThrowsConnectionExceptionAsync

also kind reminder for the PR..

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.

3 participants