[feature]:支持Sqlite数据库 (#1467)
* add sqlite3 support * 修改gorm.io/driver/sqlite 为 github.com/glebarez/sqlite 适配windows用户无cgo环境 --------- Co-authored-by: Kafumio <linzehong1_2020@qq.com> Co-authored-by: Kafumio <73083337+Kafumio@users.noreply.github.com> Co-authored-by: sliverhorn <sliver_horn@qq.com>
This commit is contained in:
@@ -19,13 +19,14 @@ func (autoCodeService *AutoCodeService) Database(businessDB string) Database {
|
||||
return AutoCodeMysql
|
||||
case "pgsql":
|
||||
return AutoCodePgsql
|
||||
case "sqlite":
|
||||
return AutoCodeSqlite
|
||||
default:
|
||||
return AutoCodeMysql
|
||||
}
|
||||
} else {
|
||||
for _, info := range global.GVA_CONFIG.DBList {
|
||||
if info.AliasName == businessDB {
|
||||
|
||||
switch info.Type {
|
||||
case "mysql":
|
||||
return AutoCodeMysql
|
||||
@@ -35,6 +36,8 @@ func (autoCodeService *AutoCodeService) Database(businessDB string) Database {
|
||||
return AutoCodePgsql
|
||||
case "oracle":
|
||||
return AutoCodeOracle
|
||||
case "sqlite":
|
||||
return AutoCodeSqlite
|
||||
default:
|
||||
return AutoCodeMysql
|
||||
}
|
||||
|
Reference in New Issue
Block a user