log.info("No dialect provded, trying to guess based on dbUrl: {}", dbCon);
// try guessing
if (dbCon.startsWith("jdbc:h2:")) {
return new H2Dialect();
} else if (dbCon.startsWith("jdbc:mysql:")) {
return new MySQLDialect();
} else if (dbCon.startsWith("jdbc:postgresql:")) {
return new PostgreSQLDialect();
} else {
throw new ParseException("could not guess dialect from url, use the -D option");
}
} else if ("h2".equalsIgnoreCase(dbDialect)) {
return new H2Dialect();
} else if ("mysql".equalsIgnoreCase(dbDialect)) {
return new MySQLDialect();
} else if ("postgresql".equalsIgnoreCase(dbDialect)) {
return new PostgreSQLDialect();
} else {
throw new ParseException("Unknown dialect: " + dbDialect);
}