MySQL 8.4.0
Source Code Documentation
mysql::utils Namespace Reference

Classes

class  Error
 Error representation used internally in case final error code is unknown and error situation handling needs to be done by the caller. More...
 
struct  Is_specialization
 Helper struct used to determine at compile time whether a given type T is a template specialization of the Primary. More...
 
struct  Is_specialization< Primary< Args... >, Primary >
 Helper struct used to determine at compile time whether a given type T is a template specialization of the Primary. More...
 

Typedefs

using Error_ptr = std::unique_ptr< mysql::utils::Error >
 

Enumerations

enum class  Return_status { ok , error }
 Simple, strongly-typed enumeration to indicate internal status: ok, error. More...
 

Functions

template<>
constexpr gtid::Gtid_format enum_max< gtid::Gtid_format > ()
 Specialization of enum_max method for Gtid_format. More...
 
template<typename Enum_type >
constexpr decltype(auto) to_underlying (Enum_type enum_value)
 Helper function that converts enum type to underlying integer type. More...
 
template<typename Enum_type >
constexpr Enum_type enum_max ()
 Template function that returns maximum valid constant that can appear in the enumeration type. More...
 
template<typename Enum_type , typename Integral_type >
constexpr std::pair< Enum_type, Return_statusto_enumeration (Integral_type value)
 Helper function that converts value of enumeration underlying type into enumeration type constant. More...
 

Typedef Documentation

◆ Error_ptr

using mysql::utils::Error_ptr = typedef std::unique_ptr<mysql::utils::Error>

Enumeration Type Documentation

◆ Return_status

enum class mysql::utils::Return_status
strong

Simple, strongly-typed enumeration to indicate internal status: ok, error.

Enumerator
ok 

operation succeeded

error 

operation failed

Function Documentation

◆ enum_max()

template<typename Enum_type >
constexpr Enum_type mysql::utils::enum_max ( )
inlineconstexpr

Template function that returns maximum valid constant that can appear in the enumeration type.

It must be specialized for each enumeration type serialized

Template Parameters
Enum_typeType of the enumeration that will be returned
Returns
Last valid enumeration constant within Enum_type

◆ enum_max< gtid::Gtid_format >()

template<>
constexpr gtid::Gtid_format mysql::utils::enum_max< gtid::Gtid_format > ( )
inlineconstexpr

Specialization of enum_max method for Gtid_format.

Returns
Maximum Gtid_format constant that can appear

◆ to_enumeration()

template<typename Enum_type , typename Integral_type >
constexpr std::pair< Enum_type, Return_status > mysql::utils::to_enumeration ( Integral_type  value)
inlineconstexpr

Helper function that converts value of enumeration underlying type into enumeration type constant.

Template Parameters
Enum_typeType of the enumeration that Integral_type parameter is converted into
Integral_typeType of the enumeration parameter that gets converted into the Enum_type

◆ to_underlying()

template<typename Enum_type >
constexpr decltype(auto) mysql::utils::to_underlying ( Enum_type  enum_value)
inlineconstexpr

Helper function that converts enum type to underlying integer type.

Note
This function may be removed after switching to C++23
Template Parameters
Enum_typeType of the enumeration parameter that gets converted into the underlying type value