Refactor / Feat : support for mysql

This commit is contained in:
MrSolarius 2023-06-12 21:16:30 +02:00
parent 65945d4852
commit 1dbab7afe3
4 changed files with 15 additions and 14 deletions

View File

@ -1,11 +0,0 @@
package de.bluecolored.bluemap.core.storage.sql;
import de.bluecolored.bluemap.core.storage.sql.dialect.MariaDBFactory;
import java.net.MalformedURLException;
public class MariaDBStorage extends SQLStorage{
public MariaDBStorage(SQLStorageSettings config) throws MalformedURLException, SQLDriverException {
super(new MariaDBFactory(), config);
}
}

View File

@ -0,0 +1,11 @@
package de.bluecolored.bluemap.core.storage.sql;
import de.bluecolored.bluemap.core.storage.sql.dialect.MySQLFactory;
import java.net.MalformedURLException;
public class MySQLStorage extends SQLStorage{
public MySQLStorage(SQLStorageSettings config) throws MalformedURLException, SQLDriverException {
super(new MySQLFactory(), config);
}
}

View File

@ -1,12 +1,13 @@
package de.bluecolored.bluemap.core.storage.sql.dialect;
import de.bluecolored.bluemap.core.storage.sql.MariaDBStorage;
import de.bluecolored.bluemap.core.storage.sql.MySQLStorage;
import de.bluecolored.bluemap.core.storage.sql.PostgreSQLStorage;
import de.bluecolored.bluemap.core.storage.sql.SQLStorage;
import de.bluecolored.bluemap.core.storage.sql.SQLStorageSettings;
public enum Dialect {
MariaDB( MariaDBStorage.class, "mariadb" ),
MySQL( MySQLStorage.class, "mysql" ),
MariaDB( MySQLStorage.class, "mariadb" ),
PostgreSQL( PostgreSQLStorage.class,"postgresql");
private final Class<? extends SQLStorage> storageClass;

View File

@ -2,7 +2,7 @@ package de.bluecolored.bluemap.core.storage.sql.dialect;
import org.intellij.lang.annotations.Language;
public class MariaDBFactory implements SQLQueryFactory {
public class MySQLFactory implements SQLQueryFactory {
@Override
@Language("MariaDB")