Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao interface {
GetDB() *gorm.DB
Ping() error
Close() error
Create(ctx context.Context, tableName string, in interface{}) error
Delete(ctx context.Context, tableName string, in interface{}, unscoped bool) error
DeleteIds(ctx context.Context, tableName string, in interface{}, ids []uint, unscoped bool) error
DeleteWhereAny(ctx context.Context, tableName string, in interface{}, unscoped bool, query interface{}, args ...interface{}) error
First(ctx context.Context, tableName string, in interface{}, query interface{}, args ...interface{}) error
Latest(ctx context.Context, tableName string, in interface{}, query interface{}, args ...interface{}) error
Find(ctx context.Context, tableName string, in interface{}, query interface{}, args ...interface{}) error
FindAndOrderByInterface(ctx context.Context, tableName string, orderBy string, in interface{}, query interface{}, args ...interface{}) error
Update(ctx context.Context, tableName string, id uint, updates interface{}) error
Count(ctx context.Context, tableName string, query interface{}, args ...interface{}) (int64, error)
FindAndLimit(ctx context.Context, tableName string, limit, offset int, in interface{}, query interface{}, args ...interface{}) error
FindAndLimitOrder(ctx context.Context, tableName, orderBy string, limit, offset int, in interface{}, query interface{}, args ...interface{}) error
FindAndLimitAndSortInterface(ctx context.Context, tableName string, in interface{}, orderBy string, offset, limit int32, query interface{}, args ...interface{}) error
DeleteWhereQuery(ctx context.Context, tableName string, in interface{}, unscoped bool, query interface{}, args ...interface{}) error
UpdateWhereQuery(ctx context.Context, tableName string, updates interface{}, query interface{}, args ...interface{}) error
}
type RedisDao ¶
type RedisDao interface {
GetRD() *redis.Client
Ping() error
Close() error
Set(ctx context.Context, key string, value interface{}) error
SetEx(ctx context.Context, key string, value interface{}, seconds int) error
Get(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error)
NewWatcher(ctx context.Context, channel string, fn func(msg *redis.Message)) error
Publish(ctx context.Context, channel string, msg string) error
}
func NewRedisDao ¶
func NewRedisDaoWithRdConfig ¶ added in v0.0.40
func NewRedisDaoWithRdConfig(rc *qxStore.RedisConfig) RedisDao
Click to show internal directories.
Click to hide internal directories.