public enum ServerVersion extends Enum<ServerVersion> implements Version
Enum Constant and Description |
---|
INVALID |
v10 |
v11 |
v12 |
v13 |
v14 |
v15 |
v16 |
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(@Nullable 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 final ServerVersion v11
public static final ServerVersion v12
public static final ServerVersion v13
public static final ServerVersion v14
public static final ServerVersion v15
public static final ServerVersion v16
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 Version
public static Version from(@Nullable 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 © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.