Documentation ¶
Index ¶
- func CreateTables(v interface{})
- func DB() *gorm.DB
- func DbByWhere(m interface{}, w *DbWhere) *dbByWhere
- func DbCount(model, where interface{}) int64
- func DbCreate(model interface{}) error
- func DbDeleteBy(model interface{}, where string, args ...interface{}) (count int64, err error)
- func DbDeleteByIds(model, ids interface{}) error
- func DbDeletes(value interface{}) error
- func DbFind(out interface{}, orders ...string) error
- func DbFindBy(out interface{}, where string, args ...interface{}) (int64, error)
- func DbFirstBy(out interface{}, where string, args ...interface{}) (err error)
- func DbFirstById(out interface{}, id uint) error
- func DbFirstWhere(out, where interface{}) error
- func DbPageRawScan(query string, obj interface{}, page, size int) (int64, error)
- func DbSave(value interface{}) error
- func DbTableByWhere(table string, w *DbWhere) *dbByWhere
- func DbUpdateById(model, id interface{}) error
- func DbUpdateByIds(model interface{}, ids []int, value map[string]interface{}) error
- func DbUpdateColBy(model interface{}, column string, value interface{}, where string, ...) error
- func DbUpdateColById(model, id interface{}, column string, value interface{}) error
- func DbUpdateColsBy(model interface{}, value map[string]interface{}, where string, ...) error
- func DbUpdateModel(model interface{}) error
- func DbUpdateModelBy(model interface{}, where string, args ...interface{}) error
- func DbUpdates(model interface{}, cols ...string) error
- func DbUpdatesBy(model interface{}, cols []string, where string, args ...interface{}) error
- func NewGormV2(name, address string) (db *gorm.DB, err error)
- func NewPartiton(table string) *dbPart
- func SetDB(db *gorm.DB)
- type DbPage
- type DbWhere
- type H
- type XTablers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DbDeleteBy ¶
DbDeleteBy 删除
func DbDeleteByIds ¶
func DbDeleteByIds(model, ids interface{}) error
DbDeleteByIds 批量删除 ids id数组 []
func DbPageRawScan ¶
DbPageRawScan obj必须是数组类型
func DbTableByWhere ¶
func DbUpdateByIds ¶
DbUpdateByIds 批量更新 ids id数组
func DbUpdateColBy ¶
func DbUpdateColById ¶
DbUpdateColById 单列更新
func DbUpdateColsBy ¶
func DbUpdateColsBy(model interface{}, value map[string]interface{}, where string, args ...interface{}) error
DbUpdateColsBy 更新多列 用于0不更新
func DbUpdateModelBy ¶
DbUpdateModelBy 条件更新
func DbUpdatesBy ¶
自定义字段,用于0不更新
func NewPartiton ¶
func NewPartiton(table string) *dbPart
Types ¶
Click to show internal directories.
Click to hide internal directories.