public enum DatabaseVendor extends Enum<DatabaseVendor>
Enum Constant and Description |
---|
FAKE_DATABASE_FOR_TESTING |
H2 |
MY_SQL |
ORACLE |
POSTGRES |
SQL_SERVER |
Modifier and Type | Method and Description |
---|---|
String |
getHumanReadableName() |
String |
getHumanReadableVersion(String databaseVersion) |
static String |
getSQLServerVersionIfExists(String version)
Microsoft SQL server markets their databases under different version names than their database reports their version
So this is so we can show error messages referencing the version they're familiar with (the marketing version)
|
static DatabaseVendor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DatabaseVendor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DatabaseVendor POSTGRES
public static final DatabaseVendor ORACLE
public static final DatabaseVendor SQL_SERVER
public static final DatabaseVendor H2
public static final DatabaseVendor MY_SQL
public static final DatabaseVendor FAKE_DATABASE_FOR_TESTING
public static DatabaseVendor[] values()
for (DatabaseVendor c : DatabaseVendor.values()) System.out.println(c);
public static DatabaseVendor valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getHumanReadableName()
public static String getSQLServerVersionIfExists(String version)
Takes a Microsoft SQL Server version string and gets its corresponding marketing version name
version
- The version as a String, e.g.: "10.50.1600.1".Copyright © 2002-2019 Atlassian. All Rights Reserved.