mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
Fix hikari for mysql and sqlite
This commit is contained in:
parent
e2b3c51cab
commit
c1d56d5ee5
@ -35,13 +35,12 @@ public class PerformBackup {
|
||||
switch (Settings.getDataSource) {
|
||||
case FILE:
|
||||
return FileBackup("auths.db");
|
||||
|
||||
case MYSQL:
|
||||
return MySqlBackup();
|
||||
|
||||
case SQLITE:
|
||||
return FileBackup(Settings.getMySQLDatabase + ".db");
|
||||
|
||||
case SQLITEHIKARI:
|
||||
return FileBackup(Settings.getMySQLDatabase + ".db");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -37,7 +37,6 @@ public class MySQL implements DataSource {
|
||||
private List<String> columnOthers;
|
||||
private HikariDataSource ds;
|
||||
private String columnRealName;
|
||||
private Connection connection;
|
||||
|
||||
public MySQL() throws ClassNotFoundException, SQLException, PoolInitializationException {
|
||||
this.host = Settings.getMySQLHost;
|
||||
|
@ -122,7 +122,8 @@ public class SQLite_HIKARI implements DataSource {
|
||||
throws ClassNotFoundException, IllegalArgumentException {
|
||||
HikariConfig config = new HikariConfig();
|
||||
config.setPoolName("AuthMeSQLitePool");
|
||||
config.setDataSourceClassName("org.sqlite.SQLiteDataSource");
|
||||
config.setDriverClassName("org.sqlite.JDBC");
|
||||
config.setDataSourceClassName("org.sqlite.javax.SQLiteConnectionPoolDataSource");
|
||||
config.setJdbcUrl("jdbc:sqlite:plugins/AuthMe/" + database + ".db");
|
||||
config.setInitializationFailFast(true); // Don't start the plugin if the database is unavariable
|
||||
config.setConnectionTestQuery("SELECT 1");
|
||||
|
Loading…
Reference in New Issue
Block a user