From a184e64f151a261a2885f045550dc7896220aa51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Mon, 19 Sep 2022 10:15:34 +0800 Subject: [PATCH] - update fun --- const.go | 2 +- gorm.go | 4 ++++ mongo.go | 7 ++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/const.go b/const.go index d847672..2abb4a0 100644 --- a/const.go +++ b/const.go @@ -1,3 +1,3 @@ package dorm -const Version = "1.0.37" +const Version = "1.0.38" diff --git a/gorm.go b/gorm.go index ce126b1..c08eeb3 100644 --- a/gorm.go +++ b/gorm.go @@ -12,6 +12,10 @@ import ( // GormClientFun *GormClient 驱动 type GormClientFun func() *GormClient +// GormClientTableFun *GormClient 驱动 +// string 表名 +type GormClientTableFun func() (*GormClient, string) + type ConfigGormClient struct { Dns string // 地址 LogStatus bool // 日志 - 状态 diff --git a/mongo.go b/mongo.go index b25a2fb..f11ad2a 100644 --- a/mongo.go +++ b/mongo.go @@ -9,9 +9,14 @@ import ( ) // MongoClientFun *MongoClient 驱动 -// databaseName string 库名 +// string 库名 type MongoClientFun func() (*MongoClient, string) +// MongoClientCollectionFun *MongoClient 驱动 +// string 库名 +// string 集合 +type MongoClientCollectionFun func() (*MongoClient, string, string) + type ConfigMongoClient struct { Dns string // 地址 Opts *options.ClientOptions