query

package
v0.0.0-...-93f7185 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListQuery

type ListQuery struct {
	*Query
}

func NewListQuery

func NewListQuery(q *Query) *ListQuery

type Query

type Query struct {
	*redis.Client
}

func NewQuery

func NewQuery(cli *redis.Client) *Query

func (*Query) ExecPipeline

func (this *Query) ExecPipeline(fun func(pipe redis.Pipeliner) error) ([]redis.Cmder, error)

type StringQuery

type StringQuery struct {
	*Query
}

func NewStringQuery

func NewStringQuery(q *Query) *StringQuery

func (*StringQuery) IncrByIfExist

func (r *StringQuery) IncrByIfExist(key string, incr int64) (int64, error)

type ZSetQuery

type ZSetQuery struct {
	*Query
}

func NewZSetQuery

func NewZSetQuery(q *Query) *ZSetQuery

func (*ZSetQuery) ZAddExpire

func (this *ZSetQuery) ZAddExpire(key string, members []redis.Z, expire time.Duration) (int64, error)

使用pipline实现的带过期时间的ZAdd

func (*ZSetQuery) ZAddExpireIfExist

func (this *ZSetQuery) ZAddExpireIfExist(key string, members []redis.Z, expire time.Duration) (int64, error)

使用pipline实现的带过期时间的ZAdd(仅当key存在时添加)

func (*ZSetQuery) ZCardIfExist

func (this *ZSetQuery) ZCardIfExist(key string) (int64, error)

使用Pipline实现的优先检查存在性的ZCard

func (*ZSetQuery) ZIsMemberIfExist

func (this *ZSetQuery) ZIsMemberIfExist(key string, member string) (bool, error)

判定Key是否存在,如果存在则检查member是否在集合中

func (*ZSetQuery) ZRangeByScoreIfExist

func (this *ZSetQuery) ZRangeByScoreIfExist(key string, opt redis.ZRangeBy) ([]string, error)

func (*ZSetQuery) ZRangeIfExist

func (this *ZSetQuery) ZRangeIfExist(key string, start, stop int64) ([]string, error)

判定Key是否存在,如果存在则返回指定排序区间的成员(正序)

func (*ZSetQuery) ZRangeWithScoresIfExist

func (this *ZSetQuery) ZRangeWithScoresIfExist(key string, start, stop int64) ([]redis.Z, error)

func (*ZSetQuery) ZRevRangeByScoreIfExist

func (this *ZSetQuery) ZRevRangeByScoreIfExist(key string, opt redis.ZRangeBy) ([]string, error)

func (*ZSetQuery) ZRevRangeIfExist

func (this *ZSetQuery) ZRevRangeIfExist(key string, start, stop int64) ([]string, error)

判定Key是否存在,如果存在则返回指定排序区间的成员(逆序)

func (*ZSetQuery) ZRevRangeWithScoresIfExist

func (this *ZSetQuery) ZRevRangeWithScoresIfExist(key string, start, stop int64) ([]redis.Z, error)

func (*ZSetQuery) ZScoreIfExist

func (this *ZSetQuery) ZScoreIfExist(key string, member string) (float64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL