Documentation ¶
Index ¶
- Constants
- Variables
- func CopyLimit(dst io.Writer, src io.Reader, length int64) (int64, error)
- func InitAsyncTask(funMap map[string]IAsync)
- 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 AsyncParams
- type Base
- func (b *Base) AppendChangeKey(field string)
- func (b *Base) Delete() bool
- func (b *Base) Exist() bool
- func (b *Base) ExistBy(key string, val any) bool
- func (b *Base) FindFirst() bool
- func (b *Base) FindFirstBy(key string, val any) bool
- func (b *Base) FindPagination(isCount bool) 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
- func (m *DbManager) Begin(f func(tx *sql.Tx) error) error
- func (m *DbManager) GetRds(db int) redis.Conn
- func (m *DbManager) GetRds1() redis.Conn
- func (m *DbManager) GetRds2() redis.Conn
- func (m *DbManager) GetRds3() redis.Conn
- func (m *DbManager) GetRds4() redis.Conn
- func (m *DbManager) GetSsdb0() redis.Conn
- func (m *DbManager) InitDb(db *Database) error
- func (m *DbManager) InitRds(conf *Redis) bool
- func (m *DbManager) InitSsdb(conf *Redis) bool
- type DbResult
- type DelayObj
- type IAsync
- type IMode
- type IPagination
- type MField
- type Redis
Constants ¶
View Source
const ( SET_IF_NOT_EXIST = "NX" SET_WITH_EXPIRE_TIME = "PX" )
View Source
const DEFAULT_QUEUE_NAME = "tube_queue"
View Source
const START_QUEUE_NAME = "queue_task_ids"
View Source
const TABLE_ROW_CACHE = "_tbl_row_"
Variables ¶
View Source
var DbHandler = DbManager{}
DbHandler 数据库句柄池
View Source
var TABLE_PREFIX string
Functions ¶
func InitAsyncTask ¶ added in v1.0.11
func ParseDbConfigAndInit ¶
Types ¶
type AsyncParams ¶ added in v1.0.11
func (*AsyncParams) GetAny ¶ added in v1.0.11
func (p *AsyncParams) GetAny(key string) any
func (*AsyncParams) GetFloat64 ¶ added in v1.0.11
func (p *AsyncParams) GetFloat64(key string) float64
func (*AsyncParams) GetInt ¶ added in v1.0.11
func (p *AsyncParams) GetInt(key string) int
func (*AsyncParams) GetInt64 ¶ added in v1.0.11
func (p *AsyncParams) GetInt64(key string) int64
func (*AsyncParams) GetString ¶ added in v1.0.11
func (p *AsyncParams) GetString(key string) string
type Base ¶
type Base struct { GetId func() int64 SetObjId func(id int64) GetEmptyModel func() IMode GetSelfModel func() IMode GetPInstance func() IPagination Obj MField Name string NotCache bool ChangeKey []string Tx *sql.Tx // contains filtered or unexported fields }
func (*Base) AppendChangeKey ¶
func (*Base) FindPagination ¶
func (*Base) SetGetIdFun ¶
func (*Base) SetObjIdFun ¶
type DelayObj ¶ added in v1.0.11
type DelayObj struct { Name string Action string Params *AsyncParams // contains filtered or unexported fields }
func (*DelayObj) WithParam ¶ added in v1.0.11
func (m *DelayObj) WithParam(p *AsyncParams) *DelayObj
type IPagination ¶
Click to show internal directories.
Click to hide internal directories.