Documentation ¶
Index ¶
- func New(key string, q *query.Query) *querySet
- type ListQuerySet
- func (this ListQuerySet) Key() string
- func (this ListQuerySet) Protect(expire time.Duration) richTypes.ListQuerySeter
- func (this ListQuerySet) Querier() richTypes.Querier
- func (this *ListQuerySet) Rebuilding() error
- func (this *ListQuerySet) ScanSlice(slc interface{}, start, stop int64) error
- func (this ListQuerySet) SetRebuildFunc(f func(ctx context.Context) ([]interface{}, time.Duration, error)) richTypes.ListQuerySeter
- func (this ListQuerySet) WithContext(ctx context.Context) richTypes.ListQuerySeter
- type StringQuerySet
- func (this *StringQuerySet) Del() error
- func (this *StringQuerySet) Get() (string, error)
- func (this *StringQuerySet) IncrBy(incr int64) (int64, error)
- func (this StringQuerySet) Key() string
- func (this StringQuerySet) Protect(expire time.Duration) richTypes.StringQuerySeter
- func (this StringQuerySet) Querier() richTypes.Querier
- func (this *StringQuerySet) Rebuilding() error
- func (this *StringQuerySet) Scan(value interface{}) error
- func (this *StringQuerySet) Set(value interface{}, expire time.Duration) error
- func (this *StringQuerySet) SetNX(value interface{}, expire time.Duration) (bool, error)
- func (this StringQuerySet) SetRebuildFunc(f func(ctx context.Context) (interface{}, time.Duration)) richTypes.StringQuerySeter
- func (this StringQuerySet) WithContext(ctx context.Context) richTypes.StringQuerySeter
- type ZSetQuerySet
- func (this *ZSetQuerySet) AddExpire(member interface{}, score float64, expire time.Duration) (int64, error)
- func (this *ZSetQuerySet) Count() (int64, error)
- func (this *ZSetQuerySet) IsMember(member string) (bool, error)
- func (this ZSetQuerySet) Key() string
- func (this *ZSetQuerySet) Members() ([]string, error)
- func (this ZSetQuerySet) Protect(expire time.Duration) richTypes.ZSetQuerySeter
- func (this ZSetQuerySet) Querier() richTypes.Querier
- func (this *ZSetQuerySet) RangeASC(start, stop int64) ([]string, error)
- func (this *ZSetQuerySet) RangeASCWithScores(start, stop int64) ([]redis.Z, error)
- func (this *ZSetQuerySet) RangeByScoreASC(min, max string, offset, count int64) ([]string, error)
- func (this *ZSetQuerySet) RangeByScoreDESC(min, max string, offset, count int64) ([]string, error)
- func (this *ZSetQuerySet) RangeDESC(start, stop int64) ([]string, error)
- func (this *ZSetQuerySet) RangeDESCWithScores(start, stop int64) ([]redis.Z, error)
- func (this *ZSetQuerySet) Rebuilding() error
- func (this *ZSetQuerySet) Rem(member ...interface{}) error
- func (this *ZSetQuerySet) Score(member string) (float64, error)
- func (this ZSetQuerySet) SetRebuildFunc(rebuildFunc func(context.Context) ([]redis.Z, time.Duration)) richTypes.ZSetQuerySeter
- func (this ZSetQuerySet) WithContext(ctx context.Context) richTypes.ZSetQuerySeter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListQuerySet ¶
type ListQuerySet struct {
// contains filtered or unexported fields
}
func (ListQuerySet) Protect ¶
func (this ListQuerySet) Protect(expire time.Duration) richTypes.ListQuerySeter
========= 连贯操作接口 ========= 保护数据库
func (*ListQuerySet) Rebuilding ¶
func (this *ListQuerySet) Rebuilding() error
func (*ListQuerySet) ScanSlice ¶
func (this *ListQuerySet) ScanSlice(slc interface{}, start, stop int64) error
func (ListQuerySet) SetRebuildFunc ¶
func (this ListQuerySet) SetRebuildFunc(f func(ctx context.Context) ([]interface{}, time.Duration, error)) richTypes.ListQuerySeter
重构List的方法(基于RPush)
func (ListQuerySet) WithContext ¶
func (this ListQuerySet) WithContext(ctx context.Context) richTypes.ListQuerySeter
type StringQuerySet ¶
type StringQuerySet struct {
// contains filtered or unexported fields
}
func (*StringQuerySet) Get ¶
func (this *StringQuerySet) Get() (string, error)
func (*StringQuerySet) IncrBy ¶
func (this *StringQuerySet) IncrBy(incr int64) (int64, error)
如果key存在,则给当前key增长指定的值
func (StringQuerySet) Protect ¶
func (this StringQuerySet) Protect(expire time.Duration) richTypes.StringQuerySeter
========= 连贯操作接口 ========= 保护数据库
func (*StringQuerySet) Rebuilding ¶
func (this *StringQuerySet) Rebuilding() error
func (*StringQuerySet) Scan ¶
func (this *StringQuerySet) Scan(value interface{}) error
func (*StringQuerySet) Set ¶
func (this *StringQuerySet) Set(value interface{}, expire time.Duration) error
========= 写入接口 ========= 写入当前key
func (*StringQuerySet) SetNX ¶
func (this *StringQuerySet) SetNX(value interface{}, expire time.Duration) (bool, error)
尝试写入当前Key,如果key存在则不写入
func (StringQuerySet) SetRebuildFunc ¶
func (this StringQuerySet) SetRebuildFunc(f func(ctx context.Context) (interface{}, time.Duration)) richTypes.StringQuerySeter
重构String的方法
func (StringQuerySet) WithContext ¶
func (this StringQuerySet) WithContext(ctx context.Context) richTypes.StringQuerySeter
type ZSetQuerySet ¶
type ZSetQuerySet struct {
// contains filtered or unexported fields
}
func (*ZSetQuerySet) Count ¶
func (this *ZSetQuerySet) Count() (int64, error)
func (*ZSetQuerySet) Members ¶
func (this *ZSetQuerySet) Members() ([]string, error)
func (ZSetQuerySet) Protect ¶
func (this ZSetQuerySet) Protect(expire time.Duration) richTypes.ZSetQuerySeter
防止频繁重建 expire 保护有效时间
func (ZSetQuerySet) Querier ¶
func (this ZSetQuerySet) Querier() richTypes.Querier
func (*ZSetQuerySet) RangeASC ¶
func (this *ZSetQuerySet) RangeASC(start, stop int64) ([]string, error)
func (*ZSetQuerySet) RangeASCWithScores ¶
func (this *ZSetQuerySet) RangeASCWithScores(start, stop int64) ([]redis.Z, error)
func (*ZSetQuerySet) RangeByScoreASC ¶
func (this *ZSetQuerySet) RangeByScoreASC(min, max string, offset, count int64) ([]string, error)
func (*ZSetQuerySet) RangeByScoreDESC ¶
func (this *ZSetQuerySet) RangeByScoreDESC(min, max string, offset, count int64) ([]string, error)
func (*ZSetQuerySet) RangeDESC ¶
func (this *ZSetQuerySet) RangeDESC(start, stop int64) ([]string, error)
func (*ZSetQuerySet) RangeDESCWithScores ¶
func (this *ZSetQuerySet) RangeDESCWithScores(start, stop int64) ([]redis.Z, error)
func (*ZSetQuerySet) Rebuilding ¶
func (this *ZSetQuerySet) Rebuilding() error
func (*ZSetQuerySet) Rem ¶
func (this *ZSetQuerySet) Rem(member ...interface{}) error
func (ZSetQuerySet) SetRebuildFunc ¶
func (this ZSetQuerySet) SetRebuildFunc(rebuildFunc func(context.Context) ([]redis.Z, time.Duration)) richTypes.ZSetQuerySeter
func (ZSetQuerySet) WithContext ¶
func (this ZSetQuerySet) WithContext(ctx context.Context) richTypes.ZSetQuerySeter
Click to show internal directories.
Click to hide internal directories.