feat(trino): 新增 Trino 可选驱动接入并补齐查询支持

- 后端新增 Trino 数据库实现与 optional driver-agent provider
- 前端补齐 catalog.schema 连接配置、URI 解析与能力开关
- SQL 编辑器对 Trino 禁用托管事务并补充前后端测试
This commit is contained in:
Syngnat
2026-06-21 13:54:42 +08:00
parent 99b75378c3
commit 8ea7ecc477
35 changed files with 1234 additions and 42 deletions

View File

@@ -249,7 +249,13 @@ const isSqlEditorTransactionControlStatement = (statement: string): boolean => {
return keyword === 'start' && /\btransaction\b/i.test(statement);
};
export const shouldUseSqlEditorManagedTransaction = (statements: string[]): boolean => {
export const shouldUseSqlEditorManagedTransactionForType = (
type: string,
statements: string[],
): boolean => {
if (String(type || '').trim().toLowerCase() === 'trino') {
return false;
}
let hasManagedWrite = false;
for (const statement of statements) {
const trimmed = String(statement || '').trim();
@@ -265,3 +271,6 @@ export const shouldUseSqlEditorManagedTransaction = (statements: string[]): bool
}
return hasManagedWrite;
};
export const shouldUseSqlEditorManagedTransaction = (statements: string[]): boolean =>
shouldUseSqlEditorManagedTransactionForType('', statements);