添加达梦数据库支持

This commit is contained in:
Devli
2024-07-23 13:07:37 +08:00
parent f0d7ddd7d2
commit f28e6f8a7a
5 changed files with 42 additions and 3 deletions

Binary file not shown.

View File

@@ -31,6 +31,21 @@
<outputDirectory>lib</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>lib/dm8</directory>
<outputDirectory>lib</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>lib/opengauss</directory>
<outputDirectory>lib</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>lib/kingbase</directory>
<outputDirectory>lib</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>src/main/assembly/bin</directory>
<outputDirectory>bin</outputDirectory>

View File

@@ -101,6 +101,9 @@ public class DataSourceServiceImpl implements DataSourceService {
case JdbcConstants.SQL_SERVER:
case JdbcConstants.JDBC:
case JdbcConstants.POSTGRESQL:
case JdbcConstants.DAMENG:
case JdbcConstants.OPENGAUSS:
case JdbcConstants.KINGBASE:
testRelationalDb(dto);
break;
case JdbcConstants.HTTP:
@@ -126,6 +129,9 @@ public class DataSourceServiceImpl implements DataSourceService {
case JdbcConstants.SQL_SERVER:
case JdbcConstants.JDBC:
case JdbcConstants.POSTGRESQL:
case JdbcConstants.DAMENG:
case JdbcConstants.OPENGAUSS:
case JdbcConstants.KINGBASE:
return executeRelationalDb(dto);
case JdbcConstants.HTTP:
return executeHttp(dto);

View File

@@ -15,7 +15,9 @@ public class JdbcConstants {
public final static String SQL_SERVER = "mssqlserver";
public final static String JDBC = "jdbc";
public final static String POSTGRESQL = "postgresql";
public final static String DAMENG = "dameng";
public final static String OPENGAUSS = "openGauss";
public final static String KINGBASE = "Kingbase";
public final static String JTDS = "jtds";
public final static String MOCK = "mock";
@@ -44,7 +46,6 @@ public class JdbcConstants {
public final static String H2_DRIVER = "org.h2.Driver";
public final static String DM = "dm";
public final static String DM_DRIVER = "dm.jdbc.driver.DmDriver";
public final static String KINGBASE = "kingbase";
public final static String KINGBASE_DRIVER = "com.kingbase.Driver";
public final static String GBASE = "gbase";
public final static String GBASE_DRIVER = "com.gbase.jdbc.Driver";

View File

@@ -1,3 +1,20 @@
INSERT INTO gaea_dict_item
(dict_code, item_name, item_value, item_extend, enabled, locale, remark, sort, create_by, create_time, update_by, update_time, version)
VALUES('SOURCE_TYPE', 'postgresql', 'postgresql', '[{"label":"driverName","value":"org.postgresql.Driver","labelValue":"驱动类"},{"label":"jdbcUrl","value":"jdbc:postgresql://127.0.0.1:5432/pgdb","labelValue":"连接串"},{"label":"username","value":"root","labelValue":"用户名"},{"label":"password","value":"root","labelValue":"密码"}]', 1, 'zh', NULL, 2, 'admin', '2021-03-23 10:54:08', 'admin', '2021-03-23 10:54:08', 1);
VALUES('SOURCE_TYPE', 'postgresql', 'postgresql', '[{"label":"driverName","value":"org.postgresql.Driver","labelValue":"驱动类"},{"label":"jdbcUrl","value":"jdbc:postgresql://127.0.0.1:5432/pgdb","labelValue":"连接串"},{"label":"username","value":"root","labelValue":"用户名"},{"label":"password","value":"root","labelValue":"密码"}]', 1, 'zh', NULL, 4, 'admin', '2021-03-23 10:54:08', 'admin', '2021-03-23 10:54:08', 1);
INSERT INTO gaea_dict_item
(dict_code, item_name, item_value, item_extend, enabled, locale, remark, sort, create_by, create_time, update_by, update_time, version)
VALUES('SOURCE_TYPE', '达梦', 'dameng', '[{"label":"driverName","value":"dm.jdbc.driver.DmDriver","labelValue":"驱动类"},{"label":"jdbcUrl","value":"jdbc:dm://127.0.0.1:5236","labelValue":"连接串"},{"label":"username","value":"SYSDBA","labelValue":"用户名"},{"label":"password","value":"SYSDBA","labelValue":"密码"}]', 1, 'zh', NULL, 11, 'admin', '2021-03-23 10:54:08', 'admin', '2021-03-23 10:54:08', 1);
INSERT INTO gaea_dict_item
(dict_code, item_name, item_value, item_extend, enabled, locale, remark, sort, create_by, create_time, update_by, update_time, version)
VALUES('SOURCE_TYPE', 'openGauss', 'openGauss', '[{"label":"driverName","value":"org.opengauss.Driver","labelValue":"驱动类"},{"label":"jdbcUrl","value":"jdbc:opengauss://127.0.0.1:5432/postgres","labelValue":"连接串"},{"label":"username","value":"gaussdb","labelValue":"用户名"},{"label":"password","value":"gaussdb","labelValue":"密码"}]', 1, 'zh', NULL, 12, 'admin', '2021-03-23 10:54:08', 'admin', '2021-03-23 10:54:08', 1);
INSERT INTO gaea_dict_item
(dict_code, item_name, item_value, item_extend, enabled, locale, remark, sort, create_by, create_time, update_by, update_time, version)
VALUES('SOURCE_TYPE', '人大金仓', 'Kingbase', '[{"label":"driverName","value":"com.kingbase8.Driver","labelValue":"驱动类"},{"label":"jdbcUrl","value":"jdbc:kingbase8://127.0.0.1:54321/test","labelValue":"连接串"},{"label":"username","value":"SYSTEM","labelValue":"用户名"},{"label":"password","value":"123456","labelValue":"密码"}]', 1, 'zh', NULL, 13, 'admin', '2021-03-23 10:54:08', 'admin', '2021-03-23 10:54:08', 1);
UPDATE gaea_dict_item SET sort=31 WHERE dict_code ='SOURCE_TYPE' and item_name='elasticsearch_sql';
UPDATE gaea_dict_item SET sort=32 WHERE dict_code ='SOURCE_TYPE' and item_name='kudu impala';
UPDATE gaea_dict_item SET sort=33 WHERE dict_code ='SOURCE_TYPE' and item_name='jdbc';
UPDATE gaea_dict_item SET sort=34 WHERE dict_code ='SOURCE_TYPE' and item_name='http';