From 8ac79942ea4d04452e8ea2ffedc934274e0f5964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=86=E7=8C=AB?= Date: Mon, 1 Apr 2024 21:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E4=BC=98=E5=8C=96getDdlGenerator?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95=E5=8E=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84case=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatisplus/extension/ddl/DdlHelper.java | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/ddl/DdlHelper.java b/mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/ddl/DdlHelper.java index 39e062ab6..f8ab9e64a 100644 --- a/mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/ddl/DdlHelper.java +++ b/mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/ddl/DdlHelper.java @@ -148,9 +148,7 @@ public static ScriptRunner getScriptRunner(Connection connection, boolean autoCo protected static IDdlGenerator getDdlGenerator(String jdbcUrl) throws RuntimeException { DbType dbType = JdbcUtils.getDbType(jdbcUrl); switch (dbType) { - case OTHER: - throw ExceptionUtils.mpe("%s database not supported.", dbType.getDb()); - case MYSQL: + case MYSQL: case MARIADB: case GBASE: case OSCAR: @@ -186,20 +184,7 @@ protected static IDdlGenerator getDdlGenerator(String jdbcUrl) throws RuntimeExc case GBASE8S_PG: case GBASE_8C: return PostgreDdlGenerator.newInstance(); - case DB2: - case SQL_SERVER2005: - case SYBASE: - case XCloud: - case GBASE_8S: - case GBASEDBT: - case GBASE_INFORMIX: - case SINODB: - case INFORMIX: - case TRINO: - case PRESTO: - throw ExceptionUtils.mpe("%s database not supported.", dbType.getDb()); - // 处理未知的数据库类型 - default: + default: throw ExceptionUtils.mpe("%s database not supported.", dbType.getDb()); }