🐛 fix(sql-editor): 修复存储过程与返回结果写语句的结果识别

- 补齐 SQL 分类逻辑,识别 SQL Server 裸存储过程调用、RETURNING/OUTPUT、SELECT INTO 及消息块场景
- 调整多语句执行与批量写入分支,避免返回行或服务端消息被 Exec 路径吞掉
- 为 PostgreSQL、OpenGauss、Kingbase、HighGo 补充 notice 回传能力并增加回归测试
This commit is contained in:
Syngnat
2026-06-14 21:37:02 +08:00
parent d7632e29a6
commit f2ffeeaf45
9 changed files with 668 additions and 15 deletions

View File

@@ -806,12 +806,10 @@ func isSQLFileBatchableWriteStatement(dbType string, stmt string) bool {
if isPLSQLBlockStatement(stmt) {
return false
}
switch leadingSQLKeyword(stmt) {
case "insert", "update", "delete", "replace", "merge", "upsert":
return true
default:
if shouldTryQueryResultFirst(dbType, stmt) {
return false
}
return isBatchableWriteSQLStatement(dbType, stmt)
}
func sqlFileBatchTransactionSQL(dbType string) (beginSQL string, commitSQL string, rollbackSQL string, ok bool) {