枚举类 DatabaseDriver
- 所有已实现的接口:
Serializable,Comparable<DatabaseDriver>,Constable
Enumeration of common database drivers.
- 从以下版本开始:
- 1.4.0
- 作者:
- Phillip Webb, Maciej Walkowiak, Marten Deinum, Stephane Nicoll
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明ClickHouse.DB2 Server.DB2 AS400 Server.Apache Derby.Firebird.H2.HANA - SAP HANA Database - HDB.HyperSQL DataBase.Informix.jTDS.Maria DB.MySQL.Oracle.Apache Phoenix.Postgres.Amazon Redshift.SQLite.SQL Server.Teradata.Testcontainers.Unknown type. -
方法概要
修饰符和类型方法说明static DatabaseDriverfromJdbcUrl(String url) Find aDatabaseDriverfor the given URL.static DatabaseDriverfromProductName(String productName) Find aDatabaseDriverfor the given product name.Return the driver class name.getId()Return the identifier of this driver.protected Collection<String> Return the url prefixes of this driver.Return the validation query.Return the XA driver source class name.protected booleanmatchProductName(String productName) static DatabaseDriver返回带有指定名称的该类的枚举常量。static DatabaseDriver[]values()返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
-
枚举常量详细资料
-
UNKNOWN
Unknown type. -
DERBY
Apache Derby. -
H2
H2. -
HSQLDB
HyperSQL DataBase. -
SQLITE
SQLite. -
MYSQL
MySQL. -
MARIADB
Maria DB. -
ORACLE
Oracle. -
POSTGRESQL
Postgres. -
REDSHIFT
Amazon Redshift.- 从以下版本开始:
- 2.2.0
-
HANA
HANA - SAP HANA Database - HDB.- 从以下版本开始:
- 2.1.0
-
JTDS
jTDS. As it can be used for several databases, there isn't a single product name we could rely on. -
SQLSERVER
SQL Server. -
FIREBIRD
Firebird. -
DB2
DB2 Server. -
DB2_AS400
DB2 AS400 Server. -
TERADATA
Teradata. -
INFORMIX
Informix. -
PHOENIX
Apache Phoenix.- 从以下版本开始:
- 2.5.0
-
TESTCONTAINERS
Testcontainers. -
CLICKHOUSE
ClickHouse.- 从以下版本开始:
- 3.4.0
-
-
方法详细资料
-
values
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同- 返回:
- 包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
-
valueOf
返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类没有带有指定名称的常量NullPointerException- 如果参数为空值
-
getId
Return the identifier of this driver.- 返回:
- the identifier
-
getUrlPrefixes
Return the url prefixes of this driver.- 返回:
- the url prefixes
-
matchProductName
-
getDriverClassName
Return the driver class name.- 返回:
- the class name or
null
-
getXaDataSourceClassName
Return the XA driver source class name.- 返回:
- the class name or
null
-
getValidationQuery
Return the validation query.- 返回:
- the validation query or
null
-
fromJdbcUrl
Find aDatabaseDriverfor the given URL.- 参数:
url- the JDBC URL- 返回:
- the database driver or
UNKNOWNif not found
-
fromProductName
Find aDatabaseDriverfor the given product name.- 参数:
productName- product name- 返回:
- the database driver or
UNKNOWNif not found
-