diff --git a/README.md b/README.md index 950b8f6..52ef550 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,12 @@ - [x] SqlServer - [x] PostgreSQL - [x] Cache DB(2016) +- [x] 达梦 - [ ] H2 (开发中) - [ ] DB2 (开发中) - [ ] HSQL (开发中) - [ ] SQLite(开发中) - [ ] 瀚高(开发中) -- [ ] 达梦 (开发中) - [ ] 虚谷 (开发中) - [ ] 人大金仓(开发中) diff --git a/lib/Dm7JdbcDriver-16.jar b/lib/Dm7JdbcDriver-16.jar deleted file mode 100644 index 5132f3f..0000000 Binary files a/lib/Dm7JdbcDriver-16.jar and /dev/null differ diff --git a/pom.xml b/pom.xml index 42bb940..5036b03 100644 --- a/pom.xml +++ b/pom.xml @@ -68,6 +68,7 @@ 42.2.14 19.3.0.0 12.1.0.2.0 + 8.1.1.193 42.2.11 1.4.200 11.5.5.0 @@ -218,6 +219,12 @@ orai18n ${orai18n.version} + + + com.dameng + DmJdbcDriver18 + ${dm.version} + org.postgresql diff --git a/screw-core/pom.xml b/screw-core/pom.xml index da6ad79..8bb0a46 100644 --- a/screw-core/pom.xml +++ b/screw-core/pom.xml @@ -81,6 +81,12 @@ orai18n provided + + + com.dameng + DmJdbcDriver18 + provided + org.postgresql diff --git a/screw-core/src/main/java/cn/smallbun/screw/core/query/dm/DmDataBaseQuery.java b/screw-core/src/main/java/cn/smallbun/screw/core/query/dm/DmDataBaseQuery.java index a036720..8458412 100644 --- a/screw-core/src/main/java/cn/smallbun/screw/core/query/dm/DmDataBaseQuery.java +++ b/screw-core/src/main/java/cn/smallbun/screw/core/query/dm/DmDataBaseQuery.java @@ -17,19 +17,6 @@ */ package cn.smallbun.screw.core.query.dm; -import static cn.smallbun.screw.core.constant.DefaultConstants.PERCENT_SIGN; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.stream.Collectors; - -import javax.sql.DataSource; - import cn.smallbun.screw.core.exception.QueryException; import cn.smallbun.screw.core.mapping.Mapping; import cn.smallbun.screw.core.metadata.Column; @@ -45,6 +32,18 @@ import cn.smallbun.screw.core.util.ExceptionUtils; import cn.smallbun.screw.core.util.JdbcUtils; +import javax.sql.DataSource; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.stream.Collectors; + +import static cn.smallbun.screw.core.constant.DefaultConstants.PERCENT_SIGN; + /** * 达梦数据库查询 * @@ -57,7 +56,7 @@ public class DmDataBaseQuery extends AbstractDatabaseQuery { private static final String DM_QUERY_TABLE_SQL = "" + "select " + " ut.table_name TABLE_NAME, " - + " utc.comments COMMENTS " + + " utc.comments REMARKS " + "from " + " user_tables ut " + "left join USER_TAB_COMMENTS utc " @@ -128,35 +127,6 @@ public Database getDataBase() throws QueryException { return model; } - /** - * 获取达梦数据库的schema - * - * @return {@link String} 达梦数据库的schema信息 - */ - @Override - public String getSchema() throws QueryException { - return null; - } - - /** - * 获取达梦数据库的schema - * - * @return {@link String} 达梦数据库的schema信息 - */ - public String getSchemaBak() throws QueryException { - try { - String schema = null; - ResultSet rs = getMetaData().getSchemas(); - while (rs.next()) { - schema = rs.getString(1); - break; - } - return schema; - } catch (Exception e) { - throw ExceptionUtils.mpe(e); - } - } - /** * 获取表信息 *