func export support

支持快捷函数导出。
This commit is contained in:
谢小军
2020-01-09 20:04:33 +08:00
parent 204164e8b9
commit 1ff17da96f
15 changed files with 932 additions and 44 deletions

View File

@@ -28,7 +28,7 @@ type _ExampleMgr struct {
// ExampleMgr open func
func ExampleMgr(db *gorm.DB) *_ExampleMgr {
if db == nil {
panic(fmt.Errorf("ExampleMgr init need db"))
panic(fmt.Errorf("ExampleMgr need init by db"))
}
return &_ExampleMgr{_BaseMgr: &_BaseMgr{DB: db}}
}
@@ -116,7 +116,7 @@ func (obj *_ExampleMgr) GetByPrimaryKeys(ids []int64) (results []*Example, err e
//////////////////////////option case ////////////////////////////////////////////
// GetByPrimaryKey 功能选项模式获取
// GetByOption 功能选项模式获取
func (obj *_ExampleMgr) GetByOption(opts ...Option) (result Example, err error) {
options := options{
query: make(map[string]interface{}, len(opts)),