feat(ignite3): add Apache Ignite 3 support
This commit is contained in:
1 parent
34c8afeb58
commit
634bb9a7d0
32 files changed
+555
-6
No files matched your search
@@ -14,6 +14,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
private static final String GAUSSDB_COMPATIBILITY_SQL =
|
||||
@@ -457,7 +458,18 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
protected abstract String buildJdbcUrl(ConnectParams params);
|
||||
|
||||
protected Connection openConnection(ConnectParams params) throws Exception {
|
||||
return DriverManager.getConnection(buildJdbcUrl(params), params.getUsername(), params.getPassword());
|
||||
return DriverManager.getConnection(buildJdbcUrl(params), buildConnectionProperties(params));
|
||||
}
|
||||
|
||||
protected Properties buildConnectionProperties(ConnectParams params) {
|
||||
Properties properties = new Properties();
|
||||
if (params.getUsername() != null) {
|
||||
properties.setProperty("user", params.getUsername());
|
||||
}
|
||||
if (params.getPassword() != null) {
|
||||
properties.setProperty("password", params.getPassword());
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
|
||||
protected Connection openTestConnection(ConnectParams params) throws Exception {
|
||||
|
||||
@@ -165,7 +165,7 @@ public class JdbcAgentProfile {
|
||||
return schemaSwitchPrefix + " " + quote + schema.replace(quote, quote + quote) + quote;
|
||||
}
|
||||
|
||||
private static String appendUrlParams(String url, String urlParams) {
|
||||
public static String appendUrlParams(String url, String urlParams) {
|
||||
String params = trimUrlParams(urlParams);
|
||||
if (params.isEmpty()) {
|
||||
return url;
|
||||
|
||||
Reference in new issue
Block a user