Versions in this module Expand all Collapse all v0 v0.0.3 Feb 19, 2023 v0.0.2 Feb 19, 2023 Changes in this version + type Controller interface + All func() ([]interface{}, error) + Count func() (int64, error) + Create func(map[string]interface{}) error + CreateIfNotExist func(map[string]interface{}, []string) error + CreateOrUpdate func(map[string]interface{}, []string, []string) (interface{}, bool, error) + CreateOrUpdateByModel func([]string, []string) (interface{}, bool, error) + Delete func(map[string]interface{}) error + Exist func() (bool, error) + Filter func(filter map[string]interface{}) Controller + Get func() (interface{}, error) + GetC2CMap func(string, string) (map[string]string, error) + GetID2KeyMap func(string) (map[int64]string, error) + GetID2Map func() (map[int64]map[string]interface{}, error) + GetKey2IDMap func(string) (map[string]int64, error) + Limit func(pageSize, pageNum int) Controller + List func() (int64, []map[string]interface{}, error) + Model func() interface{} + OrderBy func(orderBy string) Controller + SetModel func(interface{}) Controller + Update func(map[string]interface{}, []string, []string) error + func NewCtl(model interface{}) Controller + type Impl struct + func (i Impl) All() (res []interface{}, err error) + func (i Impl) Count() (int64, error) + func (i Impl) Create(data map[string]interface{}) (err error) + func (i Impl) CreateIfNotExist(data map[string]interface{}, primaryKeys []string) (err error) + func (i Impl) CreateOrUpdate(data map[string]interface{}, primaryKeys []string, updateFields []string) (obj interface{}, created bool, err error) + func (i Impl) CreateOrUpdateByModel(primaryKeys []string, updateFields []string) (obj interface{}, created bool, err error) + func (i Impl) Delete(data map[string]interface{}) (err error) + func (i Impl) Exist() (bool, error) + func (i Impl) Filter(filter map[string]interface{}) Controller + func (i Impl) Get() (interface{}, error) + func (i Impl) GetC2CMap(column1, column2 string) (res map[string]string, err error) + func (i Impl) GetID2KeyMap(key string) (res map[int64]string, err error) + func (i Impl) GetID2Map() (res map[int64]map[string]interface{}, err error) + func (i Impl) GetKey2IDMap(key string) (res map[string]int64, err error) + func (i Impl) Limit(pageSize, pageNum int) Controller + func (i Impl) List() (total int64, res []map[string]interface{}, err error) + func (i Impl) Model() interface{} + func (i Impl) OrderBy(orderBy string) Controller + func (i Impl) SetModel(model interface{}) Controller + func (i Impl) Update(data map[string]interface{}, primaryKeys []string, updateFields []string) (err error)