diff --git a/src/modules/app.provider.ts b/src/modules/app.provider.ts index 3d1a747..3ea3ab0 100644 --- a/src/modules/app.provider.ts +++ b/src/modules/app.provider.ts @@ -25,7 +25,7 @@ BI.provider('dec.connection.provider.datebase', function() { 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) { return { host: result[5], diff --git a/src/modules/constants/constant.ts b/src/modules/constants/constant.ts index f70570b..a551894 100644 --- a/src/modules/constants/constant.ts +++ b/src/modules/constants/constant.ts @@ -670,6 +670,29 @@ export const DATA_BASE_TYPES = [ '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, + } ];