mirror of
https://gitee.com/dromara/dbswitch.git
synced 2026-01-13 06:04:44 +08:00
修复Gbase8a建表语句报错
This commit is contained in:
@@ -235,7 +235,16 @@ public enum ProductTypeEnum {
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isLikeMysql() {
|
||||
return this == MYSQL || this == MARIADB || this == GBASE8A;
|
||||
return this == MYSQL || this == MARIADB;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类似于MySQL系列的数据库类型
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isLikeGbase8a() {
|
||||
return this == GBASE8A;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,7 +99,12 @@ public final class GenerateSqlUtils {
|
||||
}
|
||||
|
||||
sb.append(")");
|
||||
if (type.isLikeMysql()) {
|
||||
if (type.isLikeGbase8a()) {
|
||||
sb.append("ENGINE=EXPRESS DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin");
|
||||
if (withRemarks && StringUtils.isNotBlank(tableRemarks)) {
|
||||
sb.append(String.format(" COMMENT='%s' ", tableRemarks.replace("'", "\\'")));
|
||||
}
|
||||
} else if (type.isLikeMysql()) {
|
||||
sb.append("ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin");
|
||||
if (withRemarks && StringUtils.isNotBlank(tableRemarks)) {
|
||||
sb.append(String.format(" COMMENT='%s' ", tableRemarks.replace("'", "\\'")));
|
||||
|
||||
Reference in New Issue
Block a user