version v2.3.0 (#2392)

* v2.3.0

* up

* up

* up
This commit is contained in:
John Guo
2023-01-11 19:19:41 +08:00
committed by GitHub
parent 5e72b03b0a
commit 6ff4ed84e5
36 changed files with 511 additions and 260 deletions

View File

@ -41,7 +41,7 @@ type ConfigNode struct {
Charset string `json:"charset"` // (Optional, "utf8mb4" in default) Custom charset when operating on database.
Protocol string `json:"protocol"` // (Optional, "tcp" in default) See net.Dial for more information which networks are available.
Timezone string `json:"timezone"` // (Optional) Sets the time zone for displaying and interpreting time stamps.
Namespace string `json:"namespace"` // Namespace for some databases. Eg, in pgsql, the `Name` acts as the `catalog`, the `NameSpace` acts as the `schema`.
Namespace string `json:"namespace"` // (Optional) Namespace for some databases. Eg, in pgsql, the `Name` acts as the `catalog`, the `NameSpace` acts as the `schema`.
MaxIdleConnCount int `json:"maxIdle"` // (Optional) Max idle connection configuration for underlying connection pool.
MaxOpenConnCount int `json:"maxOpen"` // (Optional) Max open connection configuration for underlying connection pool.
MaxConnLifeTime time.Duration `json:"maxLifeTime"` // (Optional) Max amount of time a connection may be idle before being closed.

View File

@ -25,8 +25,8 @@ type IGroupHash interface {
HIncrBy(ctx context.Context, key, field string, increment int64) (int64, error)
HIncrByFloat(ctx context.Context, key, field string, increment float64) (float64, error)
HMSet(ctx context.Context, key string, fields map[string]interface{}) error
HMGet(ctx context.Context, key string, fields ...string) ([]*gvar.Var, error)
HMGet(ctx context.Context, key string, fields ...string) (gvar.Vars, error)
HKeys(ctx context.Context, key string) ([]string, error)
HVals(ctx context.Context, key string) ([]*gvar.Var, error)
HGetAll(ctx context.Context, key string) (map[string]*gvar.Var, error)
HVals(ctx context.Context, key string) (gvar.Vars, error)
HGetAll(ctx context.Context, key string) (*gvar.Var, error)
}

View File

@ -26,10 +26,10 @@ type IGroupList interface {
LIndex(ctx context.Context, key string, index int64) (*gvar.Var, error)
LInsert(ctx context.Context, key string, op LInsertOp, pivot, value interface{}) (int64, error)
LSet(ctx context.Context, key string, index int64, value interface{}) (*gvar.Var, error)
LRange(ctx context.Context, key string, start, stop int64) ([]*gvar.Var, error)
LRange(ctx context.Context, key string, start, stop int64) (gvar.Vars, error)
LTrim(ctx context.Context, key string, start, stop int64) error
BLPop(ctx context.Context, timeout int64, keys ...string) ([]*gvar.Var, error)
BRPop(ctx context.Context, timeout int64, keys ...string) ([]*gvar.Var, error)
BLPop(ctx context.Context, timeout int64, keys ...string) (gvar.Vars, error)
BRPop(ctx context.Context, timeout int64, keys ...string) (gvar.Vars, error)
RPopLPush(ctx context.Context, source, destination string) (*gvar.Var, error)
BRPopLPush(ctx context.Context, source, destination string, timeout int64) (*gvar.Var, error)
}

View File

@ -22,12 +22,12 @@ type IGroupSet interface {
SRem(ctx context.Context, key string, member interface{}, members ...interface{}) (int64, error)
SMove(ctx context.Context, source, destination string, member interface{}) (int64, error)
SCard(ctx context.Context, key string) (int64, error)
SMembers(ctx context.Context, key string) ([]*gvar.Var, error)
SMembers(ctx context.Context, key string) (gvar.Vars, error)
SMIsMember(ctx context.Context, key, member interface{}, members ...interface{}) ([]int, error)
SInter(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error)
SInter(ctx context.Context, key string, keys ...string) (gvar.Vars, error)
SInterStore(ctx context.Context, destination string, key string, keys ...string) (int64, error)
SUnion(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error)
SUnion(ctx context.Context, key string, keys ...string) (gvar.Vars, error)
SUnionStore(ctx context.Context, destination, key string, keys ...string) (int64, error)
SDiff(ctx context.Context, key string, keys ...string) ([]*gvar.Var, error)
SDiff(ctx context.Context, key string, keys ...string) (gvar.Vars, error)
SDiffStore(ctx context.Context, destination string, key string, keys ...string) (int64, error)
}

View File

@ -20,7 +20,7 @@ type IGroupSortedSet interface {
ZIncrBy(ctx context.Context, key string, increment float64, member interface{}) (float64, error)
ZCard(ctx context.Context, key string) (int64, error)
ZCount(ctx context.Context, key string, min, max string) (int64, error)
ZRange(ctx context.Context, key string, start, stop int64, option ...ZRangeOption) ([]*gvar.Var, error)
ZRange(ctx context.Context, key string, start, stop int64, option ...ZRangeOption) (gvar.Vars, error)
ZRevRange(ctx context.Context, key string, start, stop int64, option ...ZRevRangeOption) (*gvar.Var, error)
ZRank(ctx context.Context, key string, member interface{}) (int64, error)
ZRevRank(ctx context.Context, key string, member interface{}) (int64, error)