mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-06-26 00:11:43 +08:00
- 后端新增 Trino 数据库实现与 optional driver-agent provider - 前端补齐 catalog.schema 连接配置、URI 解析与能力开关 - SQL 编辑器对 Trino 禁用托管事务并补充前后端测试
15 lines
488 B
Go
15 lines
488 B
Go
package app
|
|
|
|
import "testing"
|
|
|
|
func TestShouldUseManagedSQLTransaction_TrinoAlwaysUsesPlainExecution(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
if shouldUseManagedSQLTransaction("trino", "UPDATE hive.default.orders SET status = 'done'") {
|
|
t.Fatal("expected trino DML to skip SQL editor managed transactions")
|
|
}
|
|
if shouldUseManagedSQLTransaction("trino", "BEGIN; UPDATE hive.default.orders SET status = 'done'; COMMIT;") {
|
|
t.Fatal("expected trino explicit transactions to stay unmanaged")
|
|
}
|
|
}
|