[FIX] Забытые конструкторы для API

This commit is contained in:
Gravit 2020-08-29 14:37:56 +07:00
parent 57cdd64142
commit 996d126611
No known key found for this signature in database
GPG key ID: 98A079490768CCE5
2 changed files with 23 additions and 0 deletions

View file

@ -42,6 +42,21 @@ public MySQLSourceConfig(String poolName) {
this.poolName = poolName;
}
public MySQLSourceConfig(String poolName, String address, int port, String username, String password, String database) {
this.poolName = poolName;
this.address = address;
this.port = port;
this.username = username;
this.password = password;
this.database = database;
}
public MySQLSourceConfig(String poolName, DataSource source, boolean hikari) {
this.poolName = poolName;
this.source = source;
this.hikari = hikari;
}
@Override
public synchronized void close() {
if (hikari)

View file

@ -55,6 +55,14 @@ public AuthRequest(String login, String password, String auth_id, ConnectTypes a
this.getSession = false;
}
public AuthRequest(String login, AuthPasswordInterface password, String auth_id, boolean getSession, ConnectTypes authType) {
this.login = login;
this.password = password;
this.auth_id = auth_id;
this.getSession = getSession;
this.authType = authType;
}
public static void registerProviders() {
if (!registerProviders) {
providers.register("plain", AuthPlainPassword.class);