public enum ServerVersion extends Enum<ServerVersion> implements Version
| Enum Constant and Description |
|---|
INVALID |
v10 |
v8_2 |
v8_3 |
v8_4 |
v9_0 |
v9_1 |
v9_2 |
v9_3 |
v9_4 |
v9_5 |
v9_6 |
| Modifier and Type | Method and Description |
|---|---|
static Version |
from(String version)
Attempt to parse the server version string into an XXYYZZ form version number into a
Version. |
int |
getVersionNum()
Get a machine-readable version number.
|
static ServerVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ServerVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ServerVersion INVALID
public static final ServerVersion v8_2
public static final ServerVersion v8_3
public static final ServerVersion v8_4
public static final ServerVersion v9_0
public static final ServerVersion v9_1
public static final ServerVersion v9_2
public static final ServerVersion v9_3
public static final ServerVersion v9_4
public static final ServerVersion v9_5
public static final ServerVersion v9_6
public static final ServerVersion v10
public static ServerVersion[] values()
for (ServerVersion c : ServerVersion.values()) System.out.println(c);
public static ServerVersion 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 int getVersionNum()
getVersionNum in interface Versionpublic static Version from(String version)
Attempt to parse the server version string into an XXYYZZ form version number into a
Version.
If the specified version cannot be parsed, the Version.getVersionNum() will return 0.
version - version in numeric XXYYZZ form, e.g. "090401" for 9.4.1Version representing the specified version string.Copyright © 2018 PostgreSQL Global Development Group. All rights reserved.