diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-09-28 12:40:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-28 12:40:17 -0700 |
commit | a8c01377bce777bf1940850e390e587c290e98e0 (patch) | |
tree | 0e176269b5faae110bb402b209d4f192654a435c /vendor/github.com/go-redis/redis/commands.go | |
parent | 006623e0f737ca7ee5d482fe47c09048a6f3d06a (diff) | |
download | chat-a8c01377bce777bf1940850e390e587c290e98e0.tar.gz chat-a8c01377bce777bf1940850e390e587c290e98e0.tar.bz2 chat-a8c01377bce777bf1940850e390e587c290e98e0.zip |
Updating server dependancies. (#9498)
Diffstat (limited to 'vendor/github.com/go-redis/redis/commands.go')
-rw-r--r-- | vendor/github.com/go-redis/redis/commands.go | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/vendor/github.com/go-redis/redis/commands.go b/vendor/github.com/go-redis/redis/commands.go index b259e3a8c..9954cab18 100644 --- a/vendor/github.com/go-redis/redis/commands.go +++ b/vendor/github.com/go-redis/redis/commands.go @@ -206,6 +206,8 @@ type Cmdable interface { ZLexCount(key, min, max string) *IntCmd ZIncrBy(key string, increment float64, member string) *FloatCmd ZInterStore(destination string, store ZStore, keys ...string) *IntCmd + ZPopMax(key string, count ...int64) *ZSliceCmd + ZPopMin(key string, count ...int64) *ZSliceCmd ZRange(key string, start, stop int64) *StringSliceCmd ZRangeWithScores(key string, start, stop int64) *ZSliceCmd ZRangeByScore(key string, opt ZRangeBy) *StringSliceCmd @@ -1694,6 +1696,46 @@ func (c *cmdable) ZInterStore(destination string, store ZStore, keys ...string) return cmd } +func (c *cmdable) ZPopMax(key string, count ...int64) *ZSliceCmd { + args := []interface{}{ + "zpopmax", + key, + } + + switch len(count) { + case 0: + break + case 1: + args = append(args, count[0]) + default: + panic("too many arguments") + } + + cmd := NewZSliceCmd(args...) + c.process(cmd) + return cmd +} + +func (c *cmdable) ZPopMin(key string, count ...int64) *ZSliceCmd { + args := []interface{}{ + "zpopmin", + key, + } + + switch len(count) { + case 0: + break + case 1: + args = append(args, count[0]) + default: + panic("too many arguments") + } + + cmd := NewZSliceCmd(args...) + c.process(cmd) + return cmd +} + func (c *cmdable) zRange(key string, start, stop int64, withScores bool) *StringSliceCmd { args := []interface{}{ "zrange", |