redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add key:arg pair to Arbitrary

matsuev opened this issue · comments

client.B().Arbitrary("ANY", "CMD").Keys("k1", "k2").Args("a1", "a2").Build()
will result into [ANY CMD k1 k2 a1 a2]

But, command Zadd wait aguments as key:arg pair
[ZADD NAME k1 a1 k2 a2 k3 a3....]

Hi @matsuev,

The k1, k2, and k3 should be treated as Zadd arguments, therefore the syntax should be:

client.B().Arbitrary("ZADD").Keys("NAME").Args("k1", "a1", "k2", "a2", "k3", "a3").Build()

Hi @matsuev, as answered above. Feel free to reopen this if needed. Thanks.