mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-18 19:32:47 +08:00
✨ feat(trino): 新增 Trino 可选驱动接入并补齐查询支持
- 后端新增 Trino 数据库实现与 optional driver-agent provider - 前端补齐 catalog.schema 连接配置、URI 解析与能力开关 - SQL 编辑器对 Trino 禁用托管事务并补充前后端测试
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user