redis icon indicating copy to clipboard operation
redis copied to clipboard

Set commands `SADD` and `SREM` accepting multiple `member` arguments

Open jorisbontje opened this issue 5 years ago • 1 comments

The set commands SADD and SREM accept multiple member arguments since Redis version 2.4; in nim's redis lib only the former is implemented via the sladd proc https://github.com/nim-lang/redis/blob/master/src/redis.nim#L843

For adding multiple member support for both I can see two ways about it:

  1. Add an slrem proc next to the existing srem proc. This would be in line with the existing library, but creates another non-obvious function.
  2. Change both sadd and srem to support both a string and seq[string] as members argument; deprecating / removing sladd.

What would be the preferred approach?

jorisbontje avatar Apr 24 '20 11:04 jorisbontje

I would prefer adding an slrem proc personally.

On Fri, 24 Apr 2020, at 12:57, Joris Bontje wrote:

The set commands SADD and SREM accept multiple member arguments since Redis version 2.4; in nim's redis lib only the former is implemented via the sladd proc https://github.com/nim-lang/redis/blob/master/src/redis.nim#L843

For adding multiple member support for both I can see two ways about it:

  1. Add an slrem proc next to the existing srem proc. This would be in line with the existing library, but creates another non-obvious function.
  2. Change both sadd and srem to support both a string and seq[string] as members argument; deprecating / removing sladd. What would be the preferred approach?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nim-lang/redis/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFW24KYEG54HNPJQKP3G4DROF5CVANCNFSM4MQBEKZA.

euantorano avatar Apr 24 '20 13:04 euantorano