From aed9cbd4b5cbf65981e62e11213bf41bfc2a811b Mon Sep 17 00:00:00 2001 From: "Aries.lsy" <”Aries.lsy@fanruan.com“> Date: Wed, 19 Oct 2022 15:07:31 +0800 Subject: [PATCH] =?UTF-8?q?BI-115632=20fix:jdbcResolve=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=80=82=E9=85=8DSAPHANA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/app.provider.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/app.provider.ts b/src/modules/app.provider.ts index e888267..f3e9a60 100644 --- a/src/modules/app.provider.ts +++ b/src/modules/app.provider.ts @@ -35,6 +35,17 @@ BI.provider('dec.connection.provider.datebase', function() { }; } + // 处理SAP HANA数据连接url + const sapHanaUrl = url.match(/^jdbc:(sap):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?([^]+)?(.*)/i); + if (sapHanaUrl) { + return { + host: sapHanaUrl[5], + port: sapHanaUrl[7] === 'port' ? '' : sapHanaUrl[7], + databaseName: '', + urlInfo: sapHanaUrl[9], + }; + } + // 处理oracle的RAC方式 if (/^jdbc:oracle:thin:([0-9a-zA-Z/]*)?@\(DESCRIPTION/i.test(url)) { const host = url.match(/\(HOST\s*=\s*([0-9a-zA-Z_\\.-]+)\)/i);