fix:修复mssql中getDB失败的bug

This commit is contained in:
PiexlMax(奇淼 2025-02-20 15:29:46 +08:00 committed by GitHub
parent 730ee0205e
commit 82e397f136
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ type autoCodeMssql struct{}
// Author [SliverHorn](https://github.com/SliverHorn)
func (s *autoCodeMssql) GetDB(businessDB string) (data []response.Db, err error) {
var entities []response.Db
sql := "select name AS 'database' from sysdatabases;"
sql := "select name AS 'database' from sys.databases;"
if businessDB == "" {
err = global.GVA_DB.Raw(sql).Scan(&entities).Error
} else {