枚举类 DatabaseDriver

java.lang.Object
java.lang.Enum<DatabaseDriver>
org.springframework.boot.jdbc.DatabaseDriver
所有已实现的接口:
Serializable, Comparable<DatabaseDriver>, Constable

public enum DatabaseDriver extends Enum<DatabaseDriver>
Enumeration of common database drivers.
从以下版本开始:
1.4.0
作者:
Phillip Webb, Maciej Walkowiak, Marten Deinum, Stephane Nicoll
  • 枚举常量详细资料

    • UNKNOWN

      public static final DatabaseDriver UNKNOWN
      Unknown type.
    • DERBY

      public static final DatabaseDriver DERBY
      Apache Derby.
    • H2

      public static final DatabaseDriver H2
      H2.
    • HSQLDB

      public static final DatabaseDriver HSQLDB
      HyperSQL DataBase.
    • SQLITE

      public static final DatabaseDriver SQLITE
      SQLite.
    • MYSQL

      public static final DatabaseDriver MYSQL
      MySQL.
    • MARIADB

      public static final DatabaseDriver MARIADB
      Maria DB.
    • ORACLE

      public static final DatabaseDriver ORACLE
      Oracle.
    • POSTGRESQL

      public static final DatabaseDriver POSTGRESQL
      Postgres.
    • REDSHIFT

      public static final DatabaseDriver REDSHIFT
      Amazon Redshift.
      从以下版本开始:
      2.2.0
    • HANA

      public static final DatabaseDriver HANA
      HANA - SAP HANA Database - HDB.
      从以下版本开始:
      2.1.0
    • JTDS

      public static final DatabaseDriver JTDS
      jTDS. As it can be used for several databases, there isn't a single product name we could rely on.
    • SQLSERVER

      public static final DatabaseDriver SQLSERVER
      SQL Server.
    • FIREBIRD

      public static final DatabaseDriver FIREBIRD
      Firebird.
    • DB2

      public static final DatabaseDriver DB2
      DB2 Server.
    • DB2_AS400

      public static final DatabaseDriver DB2_AS400
      DB2 AS400 Server.
    • TERADATA

      public static final DatabaseDriver TERADATA
      Teradata.
    • INFORMIX

      public static final DatabaseDriver INFORMIX
      Informix.
    • PHOENIX

      public static final DatabaseDriver PHOENIX
      Apache Phoenix.
      从以下版本开始:
      2.5.0
    • TESTCONTAINERS

      public static final DatabaseDriver TESTCONTAINERS
      Testcontainers.
    • CLICKHOUSE

      public static final DatabaseDriver CLICKHOUSE
      ClickHouse.
      从以下版本开始:
      3.4.0
  • 方法详细资料

    • values

      public static DatabaseDriver[] values()
      返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
      返回:
      包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
    • valueOf

      public static DatabaseDriver valueOf(String name)
      返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • getId

      public String getId()
      Return the identifier of this driver.
      返回:
      the identifier
    • getUrlPrefixes

      protected Collection<String> getUrlPrefixes()
      Return the url prefixes of this driver.
      返回:
      the url prefixes
    • matchProductName

      protected boolean matchProductName(String productName)
    • getDriverClassName

      public String getDriverClassName()
      Return the driver class name.
      返回:
      the class name or null
    • getXaDataSourceClassName

      public String getXaDataSourceClassName()
      Return the XA driver source class name.
      返回:
      the class name or null
    • getValidationQuery

      public String getValidationQuery()
      Return the validation query.
      返回:
      the validation query or null
    • fromJdbcUrl

      public static DatabaseDriver fromJdbcUrl(String url)
      Find a DatabaseDriver for the given URL.
      参数:
      url - the JDBC URL
      返回:
      the database driver or UNKNOWN if not found
    • fromProductName

      public static DatabaseDriver fromProductName(String productName)
      Find a DatabaseDriver for the given product name.
      参数:
      productName - product name
      返回:
      the database driver or UNKNOWN if not found