mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-09-26 00:24:09 +08:00
Support for custom drivers
This commit is contained in:
@ -103,6 +103,12 @@ public class Chat2DBContext {
|
|||||||
if (session != null) {
|
if (session != null) {
|
||||||
url = url.replace(host, "127.0.0.1").replace(port, ssh.getLocalPort());
|
url = url.replace(host, "127.0.0.1").replace(port, ssh.getLocalPort());
|
||||||
}
|
}
|
||||||
|
DriverConfig config = connectInfo.getDriverConfig();
|
||||||
|
if (config == null) {
|
||||||
|
config = getDefaultDriverConfig(connectInfo.getDbType());
|
||||||
|
connectInfo.setDriverConfig(config);
|
||||||
|
}
|
||||||
|
|
||||||
connection = getConnect(url, host, port, connectInfo.getUser(),
|
connection = getConnect(url, host, port, connectInfo.getUser(),
|
||||||
connectInfo.getPassword(), connectInfo.getDbType(),
|
connectInfo.getPassword(), connectInfo.getDbType(),
|
||||||
connectInfo.getDriverConfig(), ssh, connectInfo.getExtendMap());
|
connectInfo.getDriverConfig(), ssh, connectInfo.getExtendMap());
|
||||||
|
Reference in New Issue
Block a user