24#ifndef MYSQL_GTID_TAG_H 
   25#define MYSQL_GTID_TAG_H 
   66  Tag(
const std::string &text);
 
  197  void replace(
const char *text, std::size_t len);
 
Representation of the GTID tag.
Definition: tag.h:51
 
bool operator!=(const Tag &other) const
Operator !=.
Definition: tag.cpp:142
 
const Tag_data & get_data() const
Internal data accessor.
Definition: tag.h:175
 
static bool is_character_valid(const char &character, std::size_t pos)
Checks whether current character is a valid Tag character.
Definition: tag.cpp:112
 
std::size_t encode_tag(unsigned char *buf, const Gtid_format >id_format) const
stores Tag in buffer
Definition: tag.cpp:65
 
bool is_defined() const
Indicates whether transaction tag is defined (is not empty)
Definition: tag.h:99
 
bool is_empty() const
Indicates whether transaction tag is empty.
Definition: tag.h:95
 
bool operator<(const Tag &other) const
Compares this tag with other, <.
Definition: tag.h:114
 
std::size_t get_encoded_length(const Gtid_format >id_format) const
returns length of encoded tag, based on defined format
Definition: tag.cpp:92
 
Tag_data m_data
internal tag representation
Definition: tag.h:199
 
static constexpr std::size_t get_max_encoded_length()
Obtains maximum length of encoded tag (compile time)
Definition: tag.h:147
 
void replace(const char *text, std::size_t len)
Replaces internal tag data with a given text, includes text normalization.
Definition: tag.cpp:44
 
bool operator==(const Tag &other) const
Operator ==.
Definition: tag.cpp:140
 
Tag_data & get_data()
Internal data accessor, non const (serialization)
Definition: tag.h:179
 
std::size_t from_string(const std::string &text)
Creates Tag object from a given text.
Definition: tag.cpp:108
 
std::string Tag_data
Definition: tag.h:53
 
Tag()=default
Constructs an empty, valid tag.
 
static bool is_valid_end_char(const char &character)
Checks whether current character is a valid ending of a Tag string.
Definition: tag.cpp:103
 
std::size_t get_length() const
returns length of tag
Definition: tag.cpp:101
 
std::size_t from_cstring(const char *text)
Creates Tag object from a given text.
Definition: tag.cpp:117
 
std::string to_string() const
Obtains textual representation of internal tag.
Definition: tag.cpp:54
 
std::size_t decode_tag(const unsigned char *buf, std::size_t buf_len, const Gtid_format >id_format)
Reads Tag data from the buffer.
Definition: tag.cpp:75
 
Definition: buf0block_hint.cc:30
 
Gtid_format
Gtid binary format indicator.
Definition: gtid_format.h:39
 
constexpr std::size_t tag_max_length
Maximal number of characters in a tag.
Definition: gtid_constants.h:44
 
#define NODISCARD
The function attribute [[NODISCARD]] is a replacement for [[nodiscard]] to workaround a gcc bug.
Definition: nodiscard.h:47
 
Structure to compute hash function of a given Tag object.
Definition: tag.h:167
 
size_t operator()(const Tag &arg) const
Computes hash of a given Tag object.
Definition: tag.cpp:151
 
Tag representation so that:
Definition: tag_plain.h:48