Documentation
¶
Index ¶
- Constants
- type Dao
- func (d *Dao) Condition(data interface{}, call db.ConditionCallback) result.Result
- func (d *Dao) DBClient() (*gorm.DB, error)
- func (d *Dao) ElasticClient() (*elastic.Client, error)
- func (d *Dao) Expire(key string, time time.Duration)
- func (d *Dao) ExpireAt(key string, time time.Time)
- func (d *Dao) Get(key string) (string, error)
- func (d *Dao) GetInt(key string) (int, error)
- func (d *Dao) HDel(key, field string) (int64, error)
- func (d *Dao) HGet(key, field string) (string, error)
- func (d *Dao) HGetAll(key string) (map[string]string, error)
- func (d *Dao) HGetInt(key, field string) (int, error)
- func (d *Dao) HInc(key, field string, value int64) (int64, error)
- func (d *Dao) HSet(key, field string, value interface{}) (int64, error)
- func (d *Dao) HSetNX(key, field string, value interface{}) (bool, error)
- func (d *Dao) Inc(key string, value int64) (int64, error)
- func (d *Dao) IsNotFound(db *gorm.DB) int
- func (d *Dao) RedisClient() (*goredis.Client, error)
- func (d *Dao) ResetEsClient()
- func (d *Dao) ResetRdsClient()
- func (d *Dao) Set(key string, value interface{}, expiration time.Duration) (string, error)
- func (d *Dao) SetEX(key string, value interface{}, expiration time.Duration) (string, error)
- func (d *Dao) SetNX(key string, value interface{}, expiration time.Duration) (bool, error)
- func (d *Dao) WithContext(ctx context.Context) *Dao
Constants ¶
View Source
const KCreateDatabase = "CREATE DATABASE IF NOT EXISTS `%s` CHARACTER SET utf8mb4;"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct { Sql db.SqlDatabase Redis redis.Client Elastic db.EsDatabase Ctx context.Context // contains filtered or unexported fields }
Dao https://gorm.io/docs/query.html
func (*Dao) Condition ¶
func (d *Dao) Condition(data interface{}, call db.ConditionCallback) result.Result
func (*Dao) ElasticClient ¶ added in v1.0.60
func (*Dao) ResetEsClient ¶ added in v1.0.60
func (d *Dao) ResetEsClient()
func (*Dao) ResetRdsClient ¶ added in v1.0.60
func (d *Dao) ResetRdsClient()
Click to show internal directories.
Click to hide internal directories.