Support for custom drivers

This commit is contained in:
jipengfei-jpf
2023-06-23 15:54:53 +08:00
parent 63d002df55
commit 150d1399a6

View File

@ -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());