Enum Server.Version
- All Implemented Interfaces:
Serializable,Comparable<Server.Version>
- Enclosing class:
Server
The supported versions of MySQL in series order.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<Server.Version> Gets the versions of MySQL in order of preference. -
Method Summary
Modifier and TypeMethodDescriptionGets an unmodifiable set of the database-user permissions for this MySQL version.Gets the system databases that exist for this MySQL version.Gets the system database users that exist for this MySQL version.Gets an unmodifiable set of the user permissions for this MySQL version.booleanAccount locking (as found inuser.account_locked) is present in MySQL 5.7 and above.booleanMax user connections (as found inuser.max_user_connections) is present in MySQL 5.0 and above.booleanisAfter(Server.Version other) booleanisAlwaysLocked(User.Name user) Is the given user always locked in this version?booleanisAtLeast(Server.Version other) booleanisAtMost(Server.Version other) booleanisBefore(Server.Version other) booleanChecks whether this version matches the given X.Y.* version string.static Server.VersionGets the version matching the given X.Y.* version string.booleanShould MySQL permissions be maintained by direct updates to the user and db grant tables?toString()static Server.VersionReturns the enum constant of this type with the specified name.static Server.Version[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VERSION_4_1
-
VERSION_5_0
-
VERSION_5_6
-
VERSION_5_7
-
VERSION_8_0
-
VERSION_8_4
-
VERSION_9_7
-
-
Field Details
-
PREFERRED_VERSIONS
Gets the versions of MySQL in order of preference. Index0is the most preferred.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
parse
Gets the version matching the given X.Y.* version string.- Throws:
IllegalArgumentException- when no matching version found. Selected this exception type for consistency withvalueOf(java.lang.String).- See Also:
-
toString
- Overrides:
toStringin classEnum<Server.Version>
-
matches
Checks whether this version matches the given X.Y.* version string. -
isAtLeast
-
isAtMost
-
isBefore
-
isAfter
-
getUserPermissions
Gets an unmodifiable set of the user permissions for this MySQL version.- See Also:
-
getDatabaseUserPermissions
Gets an unmodifiable set of the database-user permissions for this MySQL version.- See Also:
-
hasMaxUserConnections
public boolean hasMaxUserConnections()Max user connections (as found inuser.max_user_connections) is present in MySQL 5.0 and above. -
hasAccountLocked
public boolean hasAccountLocked()Account locking (as found inuser.account_locked) is present in MySQL 5.7 and above. -
supportsDirectGrantTableUpdates
public boolean supportsDirectGrantTableUpdates()Should MySQL permissions be maintained by direct updates to the user and db grant tables?- Returns:
truefor older MySQL versions orfalsefor where platform now usesGRANTandREVOKE.
-
getSystemDatabases
Gets the system databases that exist for this MySQL version. -
getSystemDatabaseUsers
Gets the system database users that exist for this MySQL version. -
isAlwaysLocked
Is the given user always locked in this version?
-
