Skip to content

Commit ab63a16

Browse files
Luis729rueian
andcommitted
Call hmset from valkeycompat hmset (#128)
* b Signed-off-by: Paul Matthew Barrameda <luisanduis729@gmail.com> * fix: HMSET pipeline Signed-off-by: Rueian <rueiancsie@gmail.com> --------- Signed-off-by: Paul Matthew Barrameda <luisanduis729@gmail.com> Signed-off-by: Rueian <rueiancsie@gmail.com> Co-authored-by: Rueian <rueiancsie@gmail.com> Signed-off-by: Rueian <rueiancsie@gmail.com>
1 parent 6110040 commit ab63a16

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

rueidiscompat/adapter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ func (c *Compat) HSet(ctx context.Context, key string, values ...any) *IntCmd {
14531453

14541454
// HMSet is a deprecated version of HSet left for compatibility with Redis 3.
14551455
func (c *Compat) HMSet(ctx context.Context, key string, values ...any) *BoolCmd {
1456-
partial := c.client.B().Hset().Key(key).FieldValue()
1456+
partial := c.client.B().Hmset().Key(key).FieldValue()
14571457

14581458
args := argsToSlice(values)
14591459
for i := 0; i < len(args); i += 2 {

rueidiscompat/pipeline_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ var golden = `[
763763
["HLEN","1"],
764764
["HMGET","1","1","2"],
765765
["HSET","1","1","2"],
766-
["HSET","1","1","2"],
766+
["HMSET","1","1","2"],
767767
["HSETNX","1","1","2"],
768768
["HVALS","1"],
769769
["HRANDFIELD","1","1"],

0 commit comments

Comments
 (0)