Package org.springframework.boot.jdbc
Enum Class DatabaseDriver
- All Implemented Interfaces:
- Serializable,- Comparable<DatabaseDriver>,- Constable
Enumeration of common database drivers.
- Since:
- 1.4.0
- Author:
- Phillip Webb, Maciej Walkowiak, Marten Deinum, Stephane Nicoll
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionClickHouse.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.
- 
Method SummaryModifier and TypeMethodDescriptionstatic 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 DatabaseDriverReturns the enum constant of this class with the specified name.static DatabaseDriver[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
UNKNOWNUnknown type.
- 
DERBYApache Derby.
- 
H2H2.
- 
HSQLDBHyperSQL DataBase.
- 
SQLITESQLite.
- 
MYSQLMySQL.
- 
MARIADBMaria DB.
- 
ORACLEOracle.
- 
POSTGRESQLPostgres.
- 
REDSHIFTAmazon Redshift.- Since:
- 2.2.0
 
- 
HANAHANA - SAP HANA Database - HDB.- Since:
- 2.1.0
 
- 
JTDSjTDS. As it can be used for several databases, there isn't a single product name we could rely on.
- 
SQLSERVERSQL Server.
- 
FIREBIRDFirebird.
- 
DB2DB2 Server.
- 
DB2_AS400DB2 AS400 Server.
- 
TERADATATeradata.
- 
INFORMIXInformix.
- 
PHOENIXApache Phoenix.- Since:
- 2.5.0
 
- 
TESTCONTAINERSTestcontainers.
- 
CLICKHOUSEClickHouse.- Since:
- 3.4.0
 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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
 
- 
getIdReturn the identifier of this driver.- Returns:
- the identifier
 
- 
getUrlPrefixesReturn the url prefixes of this driver.- Returns:
- the url prefixes
 
- 
matchProductName
- 
getDriverClassNameReturn the driver class name.- Returns:
- the class name or null
 
- 
getXaDataSourceClassNameReturn the XA driver source class name.- Returns:
- the class name or null
 
- 
getValidationQueryReturn the validation query.- Returns:
- the validation query or null
 
- 
fromJdbcUrlFind aDatabaseDriverfor the given URL.- Parameters:
- url- the JDBC URL
- Returns:
- the database driver or UNKNOWNif not found
 
- 
fromProductNameFind aDatabaseDriverfor the given product name.- Parameters:
- productName- product name
- Returns:
- the database driver or UNKNOWNif not found
 
 
-