Browse Source

Merge pull request #5822 in DEC/decision-webui-dcm from final/10.0 to persist/10.0

* commit '89f2e538a12c375067c63ff3fcad399a80ed9c42':
  BI-112953 fix:jdbcResolve正则匹配trino
  BI-108526 BI-111537 feat:添加trino tdsql数据连接
persist/10.0 10.0.19.2022.09.07
superman 2 years ago
parent
commit
1dd8e44cea
  1. 2
      src/modules/app.provider.ts
  2. 23
      src/modules/constants/constant.ts

2
src/modules/app.provider.ts

@ -25,7 +25,7 @@ BI.provider('dec.connection.provider.datebase', function() {
urlInfo: greenplumUrl[9], urlInfo: greenplumUrl[9],
}; };
} }
const result = url.match(/^jdbc:(mysql|sqlserver|db2|impala|kylin|phoenix|derby|gbase|gbasedbt-sqli|informix-sqli|h2|postgresql|hive2|vertica|kingbase|presto|redshift|postgresql|clickhouse):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?(\/|;DatabaseName=)?([^]+)?(.*)/i); const result = url.match(/^jdbc:(mysql|sqlserver|db2|impala|kylin|phoenix|derby|gbase|gbasedbt-sqli|informix-sqli|h2|postgresql|hive2|vertica|kingbase|presto|redshift|postgresql|clickhouse|trino):(thin:([0-9a-zA-Z/]*)?@|thin:([0-9a-zA-Z/]*)?@\/\/|\/\/|)([0-9a-zA-Z_\\.-]+)(:([0-9|port]+))?(\/|;DatabaseName=)?([^]+)?(.*)/i);
if (result) { if (result) {
return { return {
host: result[5], host: result[5],

23
src/modules/constants/constant.ts

@ -670,6 +670,29 @@ export const DATA_BASE_TYPES = [
'org.sqlite.JDBC': 'jdbc:sqlite:[PATH_TO_DB_FILES]', 'org.sqlite.JDBC': 'jdbc:sqlite:[PATH_TO_DB_FILES]',
}, },
}, },
{
text: 'trino',
databaseType: 'trino',
driver: 'io.trino.jdbc.TrinoDriver',
url: 'jdbc:trino://hostname:port/database',
commonly: false,
internal: true,
type: 'jdbc',
hasSchema: true,
kerberos: false,
},
{
text: BI.i18nText('Dec-Dcm_Connection_TDSQL'),
databaseType: 'tdsql',
driver: 'org.postgresql.Driver',
url: 'jdbc:postgresql://hostname:port/database',
commonly: false,
internal: true,
type: 'jdbc',
hasSchema: true,
kerberos: false,
fetchSize: 10000,
}
]; ];

Loading…
Cancel
Save