From bdc5e71e82f649f2778e1eea6f680df10309126a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=93=E5=BA=B7?= Date: Mon, 13 Nov 2023 17:14:07 +0800 Subject: [PATCH] fixes oceanbase/odc#778 --- src/common/datasource/oceanbase/obmysql.ts | 1 - src/common/network/connection.ts | 1 + src/d.ts/index.ts | 1 + .../Datasource/NewDatasourceDrawer/Form/index.tsx | 6 ++++++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/common/datasource/oceanbase/obmysql.ts b/src/common/datasource/oceanbase/obmysql.ts index 602365ef0..66d5a695f 100644 --- a/src/common/datasource/oceanbase/obmysql.ts +++ b/src/common/datasource/oceanbase/obmysql.ts @@ -138,7 +138,6 @@ const items: Record< language: 'obmysql', escapeChar: '`', }, - disable: true, }, }; if (haveOCP()) { diff --git a/src/common/network/connection.ts b/src/common/network/connection.ts index be328250d..750f40736 100644 --- a/src/common/network/connection.ts +++ b/src/common/network/connection.ts @@ -42,6 +42,7 @@ function generateConnectionParams(formData: Partial, isHide const params: Partial = { creatorId: userId, type: formData.type, + defaultSchema: formData?.defaultSchema, name: formData.name, username: formData.username, password: encrypt(formData.password), diff --git a/src/d.ts/index.ts b/src/d.ts/index.ts index 799173c54..282973eab 100644 --- a/src/d.ts/index.ts +++ b/src/d.ts/index.ts @@ -712,6 +712,7 @@ export interface IConnection { errorMessage?: string; jdbcUrlParameters?: Record; sessionInitScript?: string; + defaultSchema?: string; } export interface IConnectionLabel { diff --git a/src/page/Datasource/Datasource/NewDatasourceDrawer/Form/index.tsx b/src/page/Datasource/Datasource/NewDatasourceDrawer/Form/index.tsx index 1f52cffee..4f96f6804 100644 --- a/src/page/Datasource/Datasource/NewDatasourceDrawer/Form/index.tsx +++ b/src/page/Datasource/Datasource/NewDatasourceDrawer/Form/index.tsx @@ -87,6 +87,7 @@ export default forwardRef(function DatasourceForm( 'sslConfig', 'sessionInitScript', 'jdbcUrlParameters', + 'defaultSchema', ]); } catch (e) {} if (!values) { @@ -259,6 +260,11 @@ export default forwardRef(function DatasourceForm( <> {!haveOCP() && } + {dsc?.defaultSchema ? ( + + + + ) : null}