Documentation ¶
Index ¶
- Variables
- type DBFactory
- type DBHelper
- func (helper *DBHelper) Count(db *gorm.DB, query interface{}) int64
- func (helper *DBHelper) Delete(db *gorm.DB, model interface{}) *gorm.DB
- func (helper *DBHelper) Find(db *gorm.DB, query interface{}, orderBy interface{}, selects interface{}) Result
- func (helper *DBHelper) First(db *gorm.DB, query interface{}, orderBy interface{}, selects interface{}) Result
- func (helper *DBHelper) Insert(db *gorm.DB, model interface{}) *gorm.DB
- func (helper *DBHelper) Last(db *gorm.DB, query interface{}, orderBy interface{}, selects interface{}) Result
- func (helper *DBHelper) Page(db *gorm.DB, query interface{}, page Page, orderBy interface{}, ...) Result
- func (helper *DBHelper) Save(db *gorm.DB, model interface{}) *gorm.DB
- func (helper *DBHelper) Update(db *gorm.DB, id any, model interface{}) *gorm.DB
- type IDBHelper
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MAX_DATA int64
)
Functions ¶
This section is empty.
Types ¶
type DBHelper ¶
type DBHelper struct {
// contains filtered or unexported fields
}
func NewDBHelper ¶
func NewDBHelper() *DBHelper
func NewDBHelperByTable ¶ added in v0.0.17
type IDBHelper ¶
type IDBHelper interface { Insert(db *gorm.DB, model interface{}) *gorm.DB Delete(db *gorm.DB, model interface{}) *gorm.DB Update(db *gorm.DB, id string, model interface{}) *gorm.DB Save(db *gorm.DB, model interface{}) *gorm.DB Find(db *gorm.DB, query interface{}) Result First(db *gorm.DB, query interface{}) Result Last(db *gorm.DB, query interface{}) Result Count(db *gorm.DB, query interface{}) int64 Page(db *gorm.DB, query interface{}, page Page) Result }
Click to show internal directories.
Click to hide internal directories.