增加ob数据库推断。

This commit is contained in:
pangfeihu 2024-05-09 14:46:56 +08:00
parent 1dab5a70fc
commit c976fec08c
2 changed files with 6 additions and 0 deletions

View File

@ -100,6 +100,8 @@ public class DialectFactory implements DriverNamePool {
String driver = null;
if (nameContainsProductInfo.contains("mysql") || nameContainsProductInfo.contains("cobar")) {
driver = ClassLoaderUtil.isPresent(DRIVER_MYSQL_V6, classLoader) ? DRIVER_MYSQL_V6 : DRIVER_MYSQL;
} else if (nameContainsProductInfo.contains("oceanbase")) {
driver = DRIVER_OCEANBASE;
} else if (nameContainsProductInfo.contains("oracle")) {
driver = ClassLoaderUtil.isPresent(DRIVER_ORACLE, classLoader) ? DRIVER_ORACLE : DRIVER_ORACLE_OLD;
} else if (nameContainsProductInfo.contains("postgresql")) {

View File

@ -12,6 +12,10 @@ public interface DriverNamePool {
* JDBC 驱动 MySQL
*/
String DRIVER_MYSQL = "com.mysql.jdbc.Driver";
/**
* JDBC 驱动 Oceanbase
*/
String DRIVER_OCEANBASE = "com.oceanbase.jdbc.Driver";
/**
* JDBC 驱动 MySQL在6.X版本中变动驱动类名且使用SPI机制
*/