feat: 增加ZADD ZADDWithOption

This commit is contained in:
2026-04-13 17:26:50 +08:00
parent 2adbe2bcd3
commit 825ae95ecb

View File

@@ -132,3 +132,13 @@ func (w *wrapper) ZRangeAndRemByScore(ctx context.Context, instanceFlag string,
} }
return rangeRes return rangeRes
} }
// ZAdd ...
func (w *wrapper) ZAdd(ctx context.Context, instanceFlag string, key string, score int64, data any) *define.RedisResult {
return Client.Exec(ctx, instanceFlag, consts.RedisCommandZadd, key, score, data)
}
// ZAddWithOption ...
func (w *wrapper) ZAddWithOption(ctx context.Context, instanceFlag string, key string, option string, score int64, data any) *define.RedisResult {
return Client.Exec(ctx, instanceFlag, consts.RedisCommandZadd, key, option, score, data)
}