fix: 修复 dm 配置文件
This commit is contained in:
@@ -44,7 +44,7 @@ public class DynamicCaseNamingStrategy extends CamelCaseToUnderscoresNamingStrat
|
||||
"SELECT", "SESSION", "SET", "SHARE", "SIZE", "SMALLINT", "START",
|
||||
"SUCCESSFUL", "SYNONYM", "SYSDATE", "TABLE", "THEN", "TO", "TRIGGER",
|
||||
"UNION", "UNIQUE", "UPDATE", "USER", "VALIDATE", "VALUES",
|
||||
"VARCHAR", "VARCHAR2", "VIEW", "WHENEVER", "WHERE", "WITH"
|
||||
"VARCHAR", "VARCHAR2", "VIEW", "WHENEVER", "WHERE", "WITH", "DOMAIN","AREA"
|
||||
);
|
||||
|
||||
private static boolean isOracleKeyword(String word) {
|
||||
|
||||
@@ -161,7 +161,7 @@ public class CoreDataInit implements CoreSqlBlock {
|
||||
areaList.addAll(buildAreas1());
|
||||
areaList.addAll(buildAreas2());
|
||||
areaList.addAll(buildAreas3());
|
||||
if (isOracleDatabase()) {
|
||||
if (isOracleOrDmDatabase()) {
|
||||
areaRepository.saveAllAndFlush(areaList);
|
||||
return;
|
||||
}
|
||||
@@ -178,10 +178,13 @@ public class CoreDataInit implements CoreSqlBlock {
|
||||
);
|
||||
}
|
||||
|
||||
private boolean isOracleDatabase() {
|
||||
Boolean isOracle = jdbcTemplate.execute((ConnectionCallback<Boolean>) connection ->
|
||||
connection.getMetaData().getDatabaseProductName().toLowerCase().contains("oracle"));
|
||||
return Boolean.TRUE.equals(isOracle);
|
||||
private boolean isOracleOrDmDatabase() {
|
||||
Boolean isOracleOrDm = jdbcTemplate.execute((ConnectionCallback<Boolean>) connection -> {
|
||||
String productName = connection.getMetaData().getDatabaseProductName().toLowerCase();
|
||||
// Oracle 及兼容数据库(达梦等)统一走 JPA 路径,避免原生 SQL 因大小写/引号导致表名找不到
|
||||
return productName.contains("oracle") || productName.contains("dm");
|
||||
});
|
||||
return Boolean.TRUE.equals(isOracleOrDm);
|
||||
}
|
||||
|
||||
private void initVisualizationBackground() {
|
||||
|
||||
@@ -9,7 +9,6 @@ spring:
|
||||
hibernate:
|
||||
dialect: io.dataease.config.CustomDMDialect
|
||||
auto_quote_keyword: false
|
||||
globally_quoted_identifiers: true
|
||||
jdbc:
|
||||
batch_size: 1000
|
||||
lob:
|
||||
|
||||
Reference in New Issue
Block a user