fix columnType error

This commit is contained in:
SwallowGG
2024-07-13 15:05:55 +08:00
parent 493f934a2c
commit 07320fb2e8

View File

@ -128,10 +128,12 @@ public class SqlUtils {
public static List<String> parse(String sql, DbType dbType, boolean removeComment) {
List<String> list = new ArrayList<>();
try {
if (StringUtils.isBlank(sql)) {
return list;
}
if (removeComment) {
sql = SQLParserUtils.removeComment(sql, dbType);
}
try {
if (DbType.oracle.equals(dbType)) {
SqlSplitter sqlSplitter = new SqlSplitter(PlSqlLexer.class, ";", false);
@ -154,9 +156,6 @@ public class SqlUtils {
} catch (Exception e) {
log.error("sqlSplitProcessor error", e);
}
if (removeComment) {
sql = SQLParserUtils.removeComment(sql, dbType);
}
// sql = removeDelimiter(sql);
if (StringUtils.isBlank(sql)) {
return list;