MySQL 26.7.0
Source Code Documentation
My_server_version Struct Reference

#include <my_server_version.h>

Public Member Functions

uint major () const
 
uint minor () const
 
uint patch () const
 
uint base () const
 
uint previous_lts_base () const
 
bool operator< (const My_server_version &other) const
 
bool operator>= (const My_server_version &other) const
 
bool has_same_lts_lineage_as (const My_server_version &other) const
 
bool starts_lts_lineage_after (const My_server_version &source) const
 
bool is_calendar () const
 

Static Public Member Functions

static constexpr uint encode_version (uint major, uint minor, uint patch)
 
static uint version_string_to_id (const std::string &version_string)
 Parse a version string to extract the major, minor and patch from the version and encode into version ID. More...
 

Public Attributes

uint version {0}
 
bool is_lts {false}
 
uint previous_lts {0}
 
uint upgrade_threshold {0}
 
uint downgrade_threshold {0}
 

Member Function Documentation

◆ base()

uint My_server_version::base ( ) const
inline

◆ encode_version()

static constexpr uint My_server_version::encode_version ( uint  major,
uint  minor,
uint  patch 
)
inlinestaticconstexpr

◆ has_same_lts_lineage_as()

bool My_server_version::has_same_lts_lineage_as ( const My_server_version other) const
inline

◆ is_calendar()

bool My_server_version::is_calendar ( ) const
inline

◆ major()

uint My_server_version::major ( ) const
inline

◆ minor()

uint My_server_version::minor ( ) const
inline

◆ operator<()

bool My_server_version::operator< ( const My_server_version other) const
inline

◆ operator>=()

bool My_server_version::operator>= ( const My_server_version other) const
inline

◆ patch()

uint My_server_version::patch ( ) const
inline

◆ previous_lts_base()

uint My_server_version::previous_lts_base ( ) const
inline

◆ starts_lts_lineage_after()

bool My_server_version::starts_lts_lineage_after ( const My_server_version source) const
inline

◆ version_string_to_id()

uint My_server_version::version_string_to_id ( const std::string &  version_string)
static

Parse a version string to extract the major, minor and patch from the version and encode into version ID.

The version 0 is returned in case the version string could not be parsed. For example, a version string like "9.7.4" will be encoded as the integer 90704.

Parameters
[in]version_stringinput version string
Returns
encoded version ID calculated as 10000 * Major + 100 * Minor + Patch

Member Data Documentation

◆ downgrade_threshold

uint My_server_version::downgrade_threshold {0}

◆ is_lts

bool My_server_version::is_lts {false}

◆ previous_lts

uint My_server_version::previous_lts {0}

◆ upgrade_threshold

uint My_server_version::upgrade_threshold {0}

◆ version

uint My_server_version::version {0}

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