alicebob / miniredis

Pure Go Redis server for Go unittests
MIT License
3.11k stars 217 forks source link

Support for the NOMKSTREAM option for XADD #375

Closed Jahaja closed 6 months ago

Jahaja commented 6 months ago

Hi! First of all, thanks for a very useful library.

This adds support for the NOMKSTREAM option for XADD as specified by https://redis.io/docs/latest/commands/xadd/

XADD key [NOMKSTREAM] [<MAXLEN | MINID> [= | ~] threshold [LIMIT count]] <* | id> field value [field value ...]

What the option does:

If the key does not exist, as a side effect of running this command the key is created with a stream value. The creation of stream's key can be disabled with the NOMKSTREAM option.

And the response when the option is provided:

Nil reply: if the NOMKSTREAM option is given and the key doesn't exist.

alicebob commented 6 months ago

Thanks! I'll have a look soon.

alicebob commented 6 months ago

thanks!