Documentation
¶
Index ¶
- Constants
- Variables
- func Lock(lock_key string, request_id string, fun func())
- func ParseDbConfigAndInit(path string) bool
- func TryLock(lock_key string, request_id string, timeout int) bool
- type Base
- func (b *Base) AppendChangeKey(field string)
- func (b *Base) Delete() bool
- func (b *Base) FindFirst() bool
- func (b *Base) FindFirstBy(key string, id any) bool
- func (b *Base) FindPagination() any
- func (b *Base) GetObj() MField
- func (b *Base) Order(order string) *Base
- func (b *Base) Page(page int64) *Base
- func (b *Base) PageLimit(page, pageSize int64) *Base
- func (b *Base) Save() bool
- func (b *Base) SetGetIdFun(f func() int64)
- func (b *Base) SetName(name string)
- func (b *Base) SetObj(p MField) int
- func (b *Base) SetObjIdFun(f func(id int64))
- func (b *Base) Where(where string, bind ...any) *Base
- func (b *Base) WithCond(y def.ICond)
- func (b *Base) WithTx(tx *sql.Tx)
- type Database
- type DbConfig
- type DbManager
- type DbResult
- type IMode
- type IPagination
- type MField
- type Redis
- type RedisInstance
Constants ¶
View Source
const TABLE_ROW_CACHE = "_tbl_row_"
Variables ¶
View Source
var DbHandler = DbManager{}
DbHandler 数据库句柄池
View Source
var TABLE_PREFIX string
Functions ¶
func ParseDbConfigAndInit ¶
Types ¶
type Base ¶
type Base struct { GetId func() int64 SetObjId func(id int64) GetEmptyModel func() IMode GetSelfModel func() IMode GetPInstance func() IPagination Obj MField OutRes *bytes.Buffer Name string ChangeKey []string Tx *sql.Tx // contains filtered or unexported fields }
func (*Base) AppendChangeKey ¶
func (*Base) FindPagination ¶
func (*Base) SetGetIdFun ¶
func (*Base) SetObjIdFun ¶
type DbManager ¶
func (*DbManager) GetRds ¶
func (m *DbManager) GetRds() *RedisInstance
func (*DbManager) GetSsdb ¶
func (m *DbManager) GetSsdb() *RedisInstance
type IPagination ¶
type RedisInstance ¶
Click to show internal directories.
Click to hide internal directories.