Added javadoc and updated Settings for MARIADB

@barpec12
This commit is contained in:
Florian CUNY 2019-01-13 10:05:24 +01:00
parent a1b6f97a1a
commit 348704f3d9
5 changed files with 18 additions and 4 deletions

View File

@ -44,8 +44,9 @@ public class Settings implements DataObject {
private boolean useEconomy = true;
// Database
@ConfigComment("YAML, JSON, MYSQL, MONGODB.")
@ConfigComment("YAML, JSON, MYSQL, MARIADB, MONGODB.")
@ConfigComment("YAML and JSON are both file-based databases.")
@ConfigComment("MYSQL might not work with all implementations: if available, use a dedicated database type (e.g. MARIADB).")
@ConfigComment("If you use MONGODB, you must also run the BSBMongo plugin (not addon).")
@ConfigComment("See https://github.com/tastybento/bsbMongo/releases/.")
@ConfigEntry(path = "general.database.type")

View File

@ -7,6 +7,9 @@ import world.bentobox.bentobox.database.mongodb.MongoDBDatabase;
import world.bentobox.bentobox.database.mysql.MySQLDatabase;
import world.bentobox.bentobox.database.yaml.YamlDatabase;
/**
* @author Poslovitch
*/
public interface DatabaseSetup {
/**
@ -29,6 +32,9 @@ public interface DatabaseSetup {
YAML(new YamlDatabase()),
JSON(new JSONDatabase()),
MYSQL(new MySQLDatabase()),
/**
* @since 1.1
*/
MARIADB(new MariaDBDatabase()),
MONGODB(new MongoDBDatabase());
DatabaseSetup database;

View File

@ -5,9 +5,12 @@ import world.bentobox.bentobox.database.AbstractDatabaseHandler;
import world.bentobox.bentobox.database.DatabaseConnectionSettingsImpl;
import world.bentobox.bentobox.database.DatabaseSetup;
/**
* @author barpec12
* @since 1.1
*/
public class MariaDBDatabase implements DatabaseSetup {
/* (non-Javadoc)
* @see world.bentobox.bentobox.database.BSBDbSetup#getHandler(java.lang.Class)
*/

View File

@ -8,6 +8,10 @@ import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
* @author barpec12
* @since 1.1
*/
public class MariaDBDatabaseConnector implements DatabaseConnector {
private String connectionUrl;

View File

@ -13,10 +13,10 @@ import java.util.ArrayList;
import java.util.List;
/**
*
* Class that inserts a <T> into the corresponding database-table.
*
* @author tastybento
* @author barpec12
* @since 1.1
*
* @param <T>
*/