refactor: 数据库实例表 t_instance 改为 t_db_instance

同时,为避免混淆,将 application.DbInstance 改为 application.DbConnection
This commit is contained in:
wanli
2023-09-05 08:13:32 +08:00
parent 85b64d7e8d
commit b973d63331
9 changed files with 43 additions and 39 deletions

View File

@@ -20,7 +20,7 @@ type DbSqlExecReq struct {
Sql string
Remark string
LoginAccount *model.LoginAccount
DbInstance *DbInstance
DbInstance *DbConnection
}
type DbSqlExecRes struct {
@@ -252,7 +252,7 @@ func doInsert(insert *sqlparser.Insert, execSqlReq *DbSqlExecReq, dbSqlExec *ent
return doExec(execSqlReq.Sql, execSqlReq.DbInstance)
}
func doExec(sql string, dbInstance *DbInstance) (*DbSqlExecRes, error) {
func doExec(sql string, dbInstance *DbConnection) (*DbSqlExecRes, error) {
rowsAffected, err := dbInstance.Exec(sql)
execRes := "success"
if err != nil {