Documentation
¶
Index ¶
- Constants
- type CompoundIndex
- type ErrorMysqlNotFound
- type ItfCompoundIndex
- type ItfInitData
- type MapString
- type MyBase
- type MyBase1
- type Mysql
- func (m *Mysql) AfterShutdown()
- func (m *Mysql) CacheGet(bean interface{}, condition ...interface{}) (err error)
- func (m *Mysql) Constructor()
- func (m *Mysql) DelCache(bean interface{}, condition ...interface{}) (err error)
- func (m *Mysql) Delete(bean interface{}) (err error)
- func (m *Mysql) Dial()
- func (m *Mysql) Engine() *xorm.Engine
- func (m *Mysql) GetOut() io.Writer
- func (m *Mysql) Insert(bean interface{}) (err error)
- func (m *Mysql) Migrate()
- func (m *Mysql) Sync() (err error)
- func (m *Mysql) TXCallback(fn func(sn *xorm.Session) error) (err error)
- func (m *Mysql) TableRegister(tables ...interface{})
- func (m *Mysql) Update(bean interface{}, params ...interface{}) (err error)
- type RedisSubHandlerFunc
- type Slice
Constants ¶
View Source
const ( SYSKey = "P6UEgd7ln9mpMz5hGWYqT21cSHOtkJQZ" GinContextJWTKey = "JWT" GinContextJWTTokenKey = "JWT_RAW" )
constants defined
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompoundIndex ¶
type CompoundIndex struct {
//索引字段
Columns map[string]interface{}
//是否是唯一索引
Unique bool
// contains filtered or unexported fields
}
CompoundIndex 复合索引
type ErrorMysqlNotFound ¶
type ErrorMysqlNotFound string
ErrorMysqlNotFound ...
func (ErrorMysqlNotFound) Error ¶
func (e ErrorMysqlNotFound) Error() string
type ItfCompoundIndex ¶
type ItfCompoundIndex interface {
CompoundIndexes() []*CompoundIndex
}
ItfCompoundIndex 复合索引接口
type MyBase ¶
type MyBase struct {
MyBase1 `xorm:"extends"`
Updated *g2util.JSONTime `json:"updated,omitempty" xorm:"notnull default CURRENT_TIMESTAMP updated comment('更新时间')"`
Version int64 `json:"version,omitempty" xorm:"notnull default 1 version comment('乐观锁')"`
}
MyBase xorm MySQL model base
type MyBase1 ¶
type MyBase1 struct {
ID int64 `json:"id,omitempty" xorm:"pk autoincr"`
Created *g2util.JSONTime `json:"created,omitempty" xorm:"notnull default CURRENT_TIMESTAMP created index comment('创建时间')"`
}
MyBase1 id and created
type Mysql ¶
type Mysql struct {
Config *g2util.Config `inject:""`
Grace *g2util.Graceful `inject:""`
AbFile *g2util.AbFile `inject:""`
Redis *redisObj `inject:""`
Cache *cacheMem `inject:""`
// contains filtered or unexported fields
}
Mysql ...
func (*Mysql) TXCallback ¶
TXCallback ...
func (*Mysql) TableRegister ¶
func (m *Mysql) TableRegister(tables ...interface{})
TableRegister ...注册表,用于同步数据表 ... 等
Click to show internal directories.
Click to hide internal directories.