chore: 更换sqlite库
This commit is contained in:
@@ -7,9 +7,8 @@ import (
|
||||
"regexp"
|
||||
"time"
|
||||
|
||||
// "github.com/glebarez/sqlite"
|
||||
"github.com/glebarez/sqlite"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/driver/sqlite"
|
||||
"gorm.io/gorm"
|
||||
gormLog "gorm.io/gorm/logger"
|
||||
|
||||
@@ -130,7 +129,7 @@ func Close() {
|
||||
func DB(source string) *gorm.DB {
|
||||
// 不指定时获取默认实例
|
||||
if source == "" {
|
||||
source = config.Get("gorm.defaultDataSourceName").(string)
|
||||
source = config.Get("database.defaultDataSourceName").(string)
|
||||
}
|
||||
return dbMap[source]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user