feat redis 增加 HDel

This commit is contained in:
2026-01-08 22:45:40 +08:00
parent e02e56781e
commit 69e82ec0fe

View File

@@ -49,14 +49,14 @@ func (c *Client) Set(ctx context.Context, key string, value interface{}, expirat
return c.cli.Set(ctx, key, value, expiration)
}
func (c *Client) HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd {
return c.cli.HSet(ctx, key, values)
}
func (c *Client) Get(ctx context.Context, key string) *redis.StringCmd {
return c.cli.Get(ctx, key)
}
func (c *Client) HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd {
return c.cli.HSet(ctx, key, values...)
}
func (c *Client) HGet(ctx context.Context, key, field string) *redis.StringCmd {
return c.cli.HGet(ctx, key, field)
}
@@ -65,6 +65,10 @@ func (c *Client) HGetAll(ctx context.Context, key string) *redis.MapStringString
return c.cli.HGetAll(ctx, key)
}
func (c *Client) HDel(ctx context.Context, key string, fields ...string) *redis.IntCmd {
return c.cli.HDel(ctx, key, fields...)
}
func (c *Client) Pipeline() redis.Pipeliner {
return c.cli.Pipeline()
}