mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-13 01:54:20 +08:00
🐛 fix(transaction): 修复匿名SQL块自动提交
- 区分匿名 BEGIN...END 块与显式事务控制语句 - 统一前后端方言判定并挂起 Oracle、达梦和 SQL Server 块内 DML - 补充编辑器、事务控制器及 SQL Server 回滚链路回归测试
This commit is contained in:
@@ -6633,13 +6633,13 @@ const QueryEditor: React.FC<{ tab: TabData; isActive?: boolean }> = ({ tab, isAc
|
||||
setActiveResultKey('');
|
||||
return;
|
||||
}
|
||||
const useManagedTransaction = shouldUseSqlEditorManagedTransactionForType(connCaps.type, sourceStatements);
|
||||
const useManagedTransaction = shouldUseSqlEditorManagedTransactionForType(normalizedDbType, sourceStatements);
|
||||
if (useManagedTransaction && pendingSqlTransactionRef.current) {
|
||||
message.warning(translate('query_editor.transaction.message.pending_managed_transaction'));
|
||||
return;
|
||||
}
|
||||
const managedTransactionStatementCount = sourceStatements
|
||||
.filter((statement) => shouldUseSqlEditorManagedTransactionForType(connCaps.type, [statement]))
|
||||
.filter((statement) => shouldUseSqlEditorManagedTransactionForType(normalizedDbType, [statement]))
|
||||
.length || sourceStatements.length;
|
||||
|
||||
const forceReadOnlyResult = connCaps.forceReadOnlyQueryResult;
|
||||
|
||||
Reference in New Issue
Block a user