MySQL 8.4.2
Source Code Documentation
Member_version Class Reference

represent the MySQL version of a Member within the Group Replication group. More...

#include <member_version.h>

Public Member Functions

 Member_version (unsigned int version)
 Constructs the Member_version object from a hexadecimal (base 16) representation. More...
 
uint32 get_version () const
 
const std::string get_version_string () const
 
uint32 get_major_version () const
 
uint32 get_minor_version () const
 
uint32 get_patch_version () const
 
bool operator== (const Member_version &other) const
 
bool operator!= (const Member_version &other) const
 
bool operator< (const Member_version &other) const
 
bool operator> (const Member_version &other) const
 
bool operator>= (const Member_version &other) const
 
bool operator<= (const Member_version &other) const
 
void increment_major_version ()
 Increment by 1 the major version. More...
 
void decrement_major_version ()
 Decrement by 1 the major version. More...
 
void increment_minor_version ()
 Increment by 1 the minor version. More...
 
void decrement_minor_version ()
 Decrement by 1 the minor version. More...
 
void increment_patch_version ()
 Increment by 1 the patch version. More...
 
void decrement_patch_version ()
 Decrement by 1 the patch version. More...
 

Private Member Functions

uint8_t get_major_version_decimal () const
 Return the major version in decimal (base 10) representation. More...
 
uint8_t get_minor_version_decimal () const
 Return the minor version in decimal (base 10) representation. More...
 
uint8_t get_patch_version_decimal () const
 Return the patch version in decimal (base 10) representation. More...
 
void update_version_decimal (const uint8_t major, const uint8_t minor, const uint8_t patch)
 Update the version from a decimal (base 10) representation. More...
 

Private Attributes

uint32 version
 

Detailed Description

represent the MySQL version of a Member within the Group Replication group.

Constructor & Destructor Documentation

◆ Member_version()

Member_version::Member_version ( unsigned int  version)

Constructs the Member_version object from a hexadecimal (base 16) representation.

Example: 8.0.1 -> 0x080001

Parameters
[in]versionhexadecimal (base 16) number

Member Function Documentation

◆ decrement_major_version()

void Member_version::decrement_major_version ( )

Decrement by 1 the major version.

◆ decrement_minor_version()

void Member_version::decrement_minor_version ( )

Decrement by 1 the minor version.

Note
If the minor version is 0 before the increment, the minor version becomes 99 and the major version is decremented by 1.

◆ decrement_patch_version()

void Member_version::decrement_patch_version ( )

Decrement by 1 the patch version.

Note
If the patch version is 0 before the increment, the patch version becomes 99 and the minor version is decremented by 1 (which may decrement by 1 the major version).

◆ get_major_version()

uint32 Member_version::get_major_version ( ) const
Returns
returns the major version (Major.v.v)

◆ get_major_version_decimal()

uint8_t Member_version::get_major_version_decimal ( ) const
private

Return the major version in decimal (base 10) representation.

Returns
major version in decimal (base 10) format representation

◆ get_minor_version()

uint32 Member_version::get_minor_version ( ) const
Returns
returns the minor version (v.Minor.v)

◆ get_minor_version_decimal()

uint8_t Member_version::get_minor_version_decimal ( ) const
private

Return the minor version in decimal (base 10) representation.

Returns
minor version in decimal (base 10) format representation

◆ get_patch_version()

uint32 Member_version::get_patch_version ( ) const
Returns
returns the minor version (v.v.Patch)

◆ get_patch_version_decimal()

uint8_t Member_version::get_patch_version_decimal ( ) const
private

Return the patch version in decimal (base 10) representation.

Returns
patch version in decimal (base 10) format representation

◆ get_version()

uint32 Member_version::get_version ( ) const
Returns
returns the member version.

◆ get_version_string()

const std::string Member_version::get_version_string ( ) const
Returns
returns the member version in string format.

◆ increment_major_version()

void Member_version::increment_major_version ( )

Increment by 1 the major version.

◆ increment_minor_version()

void Member_version::increment_minor_version ( )

Increment by 1 the minor version.

Note
If the minor version is 99 before the increment, the minor version becomes 0 and the major version is incremented by 1.

◆ increment_patch_version()

void Member_version::increment_patch_version ( )

Increment by 1 the patch version.

Note
If the patch version is 99 before the increment, the patch version becomes 0 and the minor version is incremented by 1 (which may increment by 1 the major version).

◆ operator!=()

bool Member_version::operator!= ( const Member_version other) const

◆ operator<()

bool Member_version::operator< ( const Member_version other) const

◆ operator<=()

bool Member_version::operator<= ( const Member_version other) const

◆ operator==()

bool Member_version::operator== ( const Member_version other) const

◆ operator>()

bool Member_version::operator> ( const Member_version other) const

◆ operator>=()

bool Member_version::operator>= ( const Member_version other) const

◆ update_version_decimal()

void Member_version::update_version_decimal ( const uint8_t  major,
const uint8_t  minor,
const uint8_t  patch 
)
private

Update the version from a decimal (base 10) representation.

Parameters
[in]majormajor version in decimal (base 10) representation
[in]minorminor version in decimal (base 10) representation
[in]patchpatch version in decimal (base 10) representation

Member Data Documentation

◆ version

uint32 Member_version::version
private

The documentation for this class was generated from the following files: