Versions in this module Expand all Collapse all v0 v0.0.11 Oct 19, 2021 v0.0.10 Sep 28, 2021 Changes in this version + var DB *gorm.DB + func DBSetup(c *DBOption) + type DBOption struct + Host string + LogMode bool + MaxIdleConns int + MaxOpenConns int + Name string + Password string + TbPrefix string + User string + type Model struct + CreatedAt uint64 + ID int + UpdatedAt uint64 + func (p *Model) BatchInsert(tableName string, fields []string, data []map[string]interface{}) + func (p *Model) BatchInsertWithError(tableName string, fields []string, data []map[string]interface{}) error + func (p *Model) GetDB() *gorm.DB + func (p *Model) LoadAllWhere(where map[string]map[string]interface{}, model *gorm.DB) *gorm.DB + func (p *Model) LoadWhereAnd(where map[string]interface{}, model *gorm.DB) *gorm.DB + func (p *Model) LoadWhereOr(where map[string]interface{}, model *gorm.DB) *gorm.DB + func (p *Model) ORMModel() + type ORMModel interface + ORMModel func() + type RuleSearchText interface + type RuleSort interface + type SearchTextRule struct + SearchText string + type Service struct + func (p *Service) ParseDateTime(startTime, endTime int, timeField string, whereAnd map[string]interface{}) map[string]interface{} + func (p *Service) ParseSearchText(searchText string, fields *[]string, whereAnd map[string]interface{}, ...) map[string]interface{} + func (p *Service) ParseSort(sort string) string + type SortRule struct + Sort string