From 825ae95ecb2963fdf60531a35e44a40f3c08498f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 13 Apr 2026 17:26:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0ZADD=20ZADDWithOption?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wrapper.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wrapper.go b/wrapper.go index 629c721..cfb9260 100644 --- a/wrapper.go +++ b/wrapper.go @@ -132,3 +132,13 @@ func (w *wrapper) ZRangeAndRemByScore(ctx context.Context, instanceFlag string, } 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) +}