MySQL 9.6.0
Source Code Documentation
mysql::gtids::Gtid Class Reference

Represents a single Gtid, consisting of a Tsid and a Sequence_number. More...

#include <gtid.h>

Inheritance diagram for mysql::gtids::Gtid:
[legend]

Public Member Functions

 Gtid ()
 Construct a new Gtid, leaving the UUID uninitialized, setting the tag to empty, and the sequence number to 1. More...
 
 Gtid (const Is_gtid auto &gtid)
 Construct a new object by copying the given Gtid. More...
 
- Public Member Functions inherited from mysql::gtids::detail::Gtid_interface< Tsid >
 Gtid_interface ()=default
 Construct a new, uninitialized object. More...
 
 Gtid_interface (const Is_gtid auto &gtid)
 Construct a new object by copying the given Gtid. More...
 
const auto & tsid () const
 Return const reference to the Tsid. More...
 
auto & tsid ()
 Return non-const reference to the Tsid. More...
 
const auto & uuid () const
 Return const reference to the Uuid. More...
 
auto & uuid ()
 Return non-const reference to the Uuid. More...
 
const auto & tag () const
 Return const reference to the Tag. More...
 
auto & tag ()
 Return non-const reference to the Tag. More...
 
Sequence_number get_sequence_number () const
 Return the Sequence_number. More...
 
void throwing_set_sequence_number (const Sequence_number &sequence_number)
 Set and validate the Sequence_number. More...
 
auto set_sequence_number (const Sequence_number &sequence_number)
 Set and validate the Sequence_number. More...
 
auto assign (const Is_gtid auto &other)
 Copy from other to this. More...
 

Static Public Member Functions

static Gtid throwing_make (const mysql::uuids::Uuid &uuid, const Is_tag auto &tag, Sequence_number sequence_number)
 Return a new object constructed from the given Uuid, Tag, and Sequence_number. More...
 
static Gtid throwing_make (const mysql::uuids::Uuid &uuid, Sequence_number sequence_number)
 Return a new object constructed from the given Uuid and Sequence_number, using an empty tag. More...
 
static Gtid throwing_make (const Is_tsid auto &tsid, Sequence_number sequence_number)
 Return a new object constructed from the given Tsid and Sequence_number. More...
 

Protected Member Functions

 Gtid (const mysql::uuids::Uuid &uuid, const Is_tag auto &tag, Sequence_number sequence_number)
 Construct a new object from the given Uuid, Tag, and Sequence_number. More...
 
 Gtid (const mysql::uuids::Uuid &uuid, Sequence_number sequence_number)
 Construct a new object from the given Uuid and Sequence_number, using an empty tag. More...
 
 Gtid (const Is_tsid auto &tsid, Sequence_number sequence_number)
 Construct a new object from the given Tsid and Sequence_number. More...
 
- Protected Member Functions inherited from mysql::gtids::detail::Gtid_interface< Tsid >
 Gtid_interface (const mysql::uuids::Uuid &uuid, const Is_tag auto &tag, Sequence_number sequence_number)
 Construct a new object from the given Uuid, Tag, and Sequence_number. More...
 
 Gtid_interface (const mysql::uuids::Uuid &uuid, Sequence_number sequence_number)
 Construct a new object from the given Uuid and Sequence_number, using an empty tag. More...
 
 Gtid_interface (const Is_tsid auto &tsid, Sequence_number sequence_number)
 Construct a new object from the given Tsid and Sequence_number. More...
 

Private Types

using Base_t = detail::Gtid_interface< Tsid >
 

Detailed Description

Represents a single Gtid, consisting of a Tsid and a Sequence_number.

The default constructor for this class will initialize the sequence number to sequence_number_min, the tag to empty, and leave the UUID uninitialized. Thus, it does not satisfy std::is_trivially_default_constructible.

Member Typedef Documentation

◆ Base_t

Constructor & Destructor Documentation

◆ Gtid() [1/5]

mysql::gtids::Gtid::Gtid ( const mysql::uuids::Uuid uuid,
const Is_tag auto &  tag,
Sequence_number  sequence_number 
)
inlineexplicitprotected

Construct a new object from the given Uuid, Tag, and Sequence_number.

Exceptions
std::domain_errorif the given number is out of range.

◆ Gtid() [2/5]

mysql::gtids::Gtid::Gtid ( const mysql::uuids::Uuid uuid,
Sequence_number  sequence_number 
)
inlineexplicitprotected

Construct a new object from the given Uuid and Sequence_number, using an empty tag.

Exceptions
std::domain_errorif the given number is out of range.

◆ Gtid() [3/5]

mysql::gtids::Gtid::Gtid ( const Is_tsid auto &  tsid,
Sequence_number  sequence_number 
)
inlineexplicitprotected

Construct a new object from the given Tsid and Sequence_number.

Exceptions
std::domain_errorif the given number is out of range.

◆ Gtid() [4/5]

mysql::gtids::Gtid::Gtid ( )
inline

Construct a new Gtid, leaving the UUID uninitialized, setting the tag to empty, and the sequence number to 1.

◆ Gtid() [5/5]

mysql::gtids::Gtid::Gtid ( const Is_gtid auto &  gtid)
inlineexplicit

Construct a new object by copying the given Gtid.

Member Function Documentation

◆ throwing_make() [1/3]

static Gtid mysql::gtids::Gtid::throwing_make ( const Is_tsid auto &  tsid,
Sequence_number  sequence_number 
)
inlinestatic

Return a new object constructed from the given Tsid and Sequence_number.

Use in exception-free code only if the sequence_number has been validated already.

Exceptions
std::domain_errorif the given number is out of range.

◆ throwing_make() [2/3]

static Gtid mysql::gtids::Gtid::throwing_make ( const mysql::uuids::Uuid uuid,
const Is_tag auto &  tag,
Sequence_number  sequence_number 
)
inlinestatic

Return a new object constructed from the given Uuid, Tag, and Sequence_number.

Use in exception-free code only if the sequence_number has been validated already.

Exceptions
std::domain_errorif the given number is out of range.

◆ throwing_make() [3/3]

static Gtid mysql::gtids::Gtid::throwing_make ( const mysql::uuids::Uuid uuid,
Sequence_number  sequence_number 
)
inlinestatic

Return a new object constructed from the given Uuid and Sequence_number, using an empty tag.

Use in exception-free code only if the sequence_number has been validated already.

Exceptions
std::domain_errorif the given number is out of range.

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