mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
增加ob数据库推断。
This commit is contained in:
parent
1dab5a70fc
commit
c976fec08c
@ -100,6 +100,8 @@ public class DialectFactory implements DriverNamePool {
|
|||||||
String driver = null;
|
String driver = null;
|
||||||
if (nameContainsProductInfo.contains("mysql") || nameContainsProductInfo.contains("cobar")) {
|
if (nameContainsProductInfo.contains("mysql") || nameContainsProductInfo.contains("cobar")) {
|
||||||
driver = ClassLoaderUtil.isPresent(DRIVER_MYSQL_V6, classLoader) ? DRIVER_MYSQL_V6 : DRIVER_MYSQL;
|
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")) {
|
} else if (nameContainsProductInfo.contains("oracle")) {
|
||||||
driver = ClassLoaderUtil.isPresent(DRIVER_ORACLE, classLoader) ? DRIVER_ORACLE : DRIVER_ORACLE_OLD;
|
driver = ClassLoaderUtil.isPresent(DRIVER_ORACLE, classLoader) ? DRIVER_ORACLE : DRIVER_ORACLE_OLD;
|
||||||
} else if (nameContainsProductInfo.contains("postgresql")) {
|
} else if (nameContainsProductInfo.contains("postgresql")) {
|
||||||
|
@ -12,6 +12,10 @@ public interface DriverNamePool {
|
|||||||
* JDBC 驱动 MySQL
|
* JDBC 驱动 MySQL
|
||||||
*/
|
*/
|
||||||
String DRIVER_MYSQL = "com.mysql.jdbc.Driver";
|
String DRIVER_MYSQL = "com.mysql.jdbc.Driver";
|
||||||
|
/**
|
||||||
|
* JDBC 驱动 Oceanbase
|
||||||
|
*/
|
||||||
|
String DRIVER_OCEANBASE = "com.oceanbase.jdbc.Driver";
|
||||||
/**
|
/**
|
||||||
* JDBC 驱动 MySQL,在6.X版本中变动驱动类名,且使用SPI机制
|
* JDBC 驱动 MySQL,在6.X版本中变动驱动类名,且使用SPI机制
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user