Documentation ¶
Overview ¶
* * @Author: TheLife * @Date: 2020-4-24 1:38 下午
* * @Author: TheLife * @Date: 2020-2-25 9:00 下午
* * @Author: TheLife * @Date: 2020-11-8 6:50 下午
* * @Author: TheLife * @Date: 2020-11-8 7:04 下午
* * @Author: TheLife * @Date: 2020-11-8 6:58 下午
* * @Author: TheLife * @Date: 2020-2-25 9:00 下午
* * @Author: TheLife * @Date: 2020-11-8 6:27 下午
Index ¶
- func FieldTab(tab ...T) []string
- func InitDb(utils *DbUtils, defaultDb *gorm.DB) *gorm.DB
- type DbJoin
- type DbOffset
- type DbOrder
- type DbUpdates
- type DbUtils
- func (d *DbUtils) CrudAll(fields []string, where interface{}, list interface{}, defaultDb *gorm.DB) error
- func (d *DbUtils) CrudAllPage(fields []string, where interface{}, list interface{}, limit uint, ...) (count uint, err error)
- func (d *DbUtils) CrudCount(where interface{}, defaultDb *gorm.DB) (count uint, err error)
- func (d *DbUtils) CrudDelete(where interface{}, defaultDb *gorm.DB) error
- func (d *DbUtils) CrudOne(fields []string, where interface{}, one interface{}, defaultDb *gorm.DB) error
- func (d *DbUtils) CrudSum(field string, where interface{}, defaultDb *gorm.DB) (sum float32, err error)
- func (d *DbUtils) CrudUpdate(updates map[string]interface{}, where interface{}, defaultDb *gorm.DB, ...) (err error)
- func (d *DbUtils) GetJoin(tx *gorm.DB) *gorm.DB
- func (d *DbUtils) GetOffSet(tx *gorm.DB) *gorm.DB
- func (d *DbUtils) GetOrder(tx *gorm.DB) *gorm.DB
- func (d *DbUtils) GetUpdate() (m *map[string]interface{})
- func (d *DbUtils) GetWhere(tx *gorm.DB) *gorm.DB
- func (d *DbUtils) Join(w interface{}) *DbUtils
- func (d *DbUtils) OffSet(w interface{}) *DbUtils
- func (d *DbUtils) Order(w interface{}) *DbUtils
- func (d *DbUtils) Update(w interface{}) *DbUtils
- func (d *DbUtils) Where(w interface{}) *DbUtils
- func (d *DbUtils) WhereIsEmpty() bool
- type DbWheres
- type Field
- type T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DbUtils ¶
type DbUtils struct { Db *gorm.DB `json:"-"` Wheres *DbWheres Updates *DbUpdates Orders *DbOrder Joins *DbJoin Offset *DbOffset }
func (*DbUtils) CrudAllPage ¶
func (*DbUtils) CrudDelete ¶
func (*DbUtils) CrudUpdate ¶
func (*DbUtils) WhereIsEmpty ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.