java.lang.Object
java.lang.Enum<PrometheusJDBCDriver>
io.github.tonywasher.joceanus.prometheus.database.PrometheusJDBCDriver
All Implemented Interfaces:
Serializable, Comparable<PrometheusJDBCDriver>, Constable

public enum PrometheusJDBCDriver extends Enum<PrometheusJDBCDriver>
Database Drivers. Also code that encapsulates differences between databases.
  • Enum Constant Details

  • Field Details

    • PORT_MARIADB

      static final int PORT_MARIADB
      DefaultPort for MariaDB/MySQL.
      See Also:
    • PORT_POSTGRESQL

      static final int PORT_POSTGRESQL
      DefaultPort for PostgreSQL.
      See Also:
    • PORT_SQLEXPRESS

      static final int PORT_SQLEXPRESS
      DefaultPort for SQLExpress.
      See Also:
    • INSTANCE_SQLEXPRESS

      static final String INSTANCE_SQLEXPRESS
      DefaultInstance for SQLExpress.
      See Also:
  • Method Details

    • values

      public static PrometheusJDBCDriver[] 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 PrometheusJDBCDriver 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
    • toString

      public String toString()
      Overrides:
      toString in class Enum<PrometheusJDBCDriver>
    • useInstance

      public boolean useInstance()
      Determine whether we use instance.
      Returns:
      true/false
    • useQuotes

      public boolean useQuotes()
      Determine whether we use quotes.
      Returns:
      true/false
    • usePort

      public boolean usePort()
      Determine whether we use port.
      Returns:
      true/false
    • getDefaultPort

      public Integer getDefaultPort()
      Obtain default port.
      Returns:
      the default port
    • getPrefix

      public String getPrefix()
      Obtain connection prefix.
      Returns:
      the connection prefix
    • getConnectionString

      public String getConnectionString(String pDatabase, String pServer, Integer pPort)
      Get connection string.
      Parameters:
      pDatabase - the database
      pServer - the server
      pPort - the port
      Returns:
      the connection string
    • getConnectionString

      public String getConnectionString(String pServer, Integer pPort)
      Get connection string for database create.
      Parameters:
      pServer - the server
      pPort - the port
      Returns:
      the connection string
    • getDatabaseType

      public String getDatabaseType(PrometheusColumnType pType)
      Obtain the database type for the field.
      Parameters:
      pType - the data type
      Returns:
      the database column type
    • defineBinaryLength

      public boolean defineBinaryLength()
      Should we define binary length?
      Returns:
      true/false
    • explicitDropIndex

      public boolean explicitDropIndex()
      Should we explicitly drop indexes?
      Returns:
      true/false