Enum Class DBType

java.lang.Object
java.lang.Enum<DBType>
com.djrapitops.plan.storage.database.DBType
All Implemented Interfaces:
Serializable, Comparable<DBType>, Constable

public enum DBType extends Enum<DBType>
An enum which stores the name, the config name and if the Database supports MySQL Queries
  • Enum Constant Details

    • MYSQL

      public static final DBType MYSQL
    • SQLITE

      public static final DBType SQLITE
  • Method Details

    • values

      public static DBType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DBType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Gets the name of the DBType
      Returns:
      the name
    • getConfigName

      public String getConfigName()
      Gets the config name of the DBType
      Returns:
      the config name
    • supportsMySQLQueries

      public boolean supportsMySQLQueries()
      Used to check if the DBType supports most MySQL MySQLSchemaQueries.

      When specific Statements are not compatible, the DBType should be checked.

      Returns:
      if the database supports MySQL MySQLSchemaQueries
    • getForName

      public static Optional<DBType> getForName(String name)
      Gets an Optional<DBType> which matches name.

      This method is case-insensitive.

      The Optional<DBType> is empty when no DBType is found.

      Parameters:
      name - the name of the DBType
      Returns:
      an Optional<DBType>
    • exists

      public static boolean exists(String name)
      Checks if the name of a DBType corresponds to name.

      This method is case-insensitive.

      Parameters:
      name - the name of the DBType
      Returns:
      if the DBType exists
      See Also:
    • names

      public static List<String> names()
    • getSql

      public Sql getSql()