MySQL 9.6.0
Source Code Documentation
mysql::strconv::Gtid_binary_format Struct Reference

#include <gtid_binary_format.h>

Inheritance diagram for mysql::strconv::Gtid_binary_format:
[legend]

Public Types

enum class  Version { v0_tagless = 0 , v1_tags = 1 , v2_tags_compact = 2 }
 The format version. See readme.md for format specifications. More...
 
enum class  Version_policy { v0_tagless = 0 , v1_tags = 1 , v2_tags_compact = 2 , automatic = 3 }
 Policy for choosing a version. More...
 

Public Member Functions

 Gtid_binary_format ()=default
 
constexpr Gtid_binary_format (const Version_policy &version_policy)
 
auto parent () const
 

Static Public Member Functions

static Version_policy to_version_policy (Version version)
 Returns the Version_policy that specifies the given concrete version. More...
 

Public Attributes

Version_policy m_version_policy = Version_policy::automatic
 Policy for the version to use. More...
 

Member Enumeration Documentation

◆ Version

The format version. See readme.md for format specifications.

Enumerator
v0_tagless 

Version 0, which does not support tags.

Encoding a nonempty tag with this is undefined behavior. Decoding a tag with this clears the tag without reading any input.

v1_tags 

Version 1, which supports tags.

v2_tags_compact 

Version 2, which supports tags and is more space-efficient.

◆ Version_policy

Policy for choosing a version.

This either a specified version, or 'automatic'.

Enumerator
v0_tagless 
v1_tags 
v2_tags_compact 
automatic 

Encode using an automatically selected format.

Currently, this favors compatibility and uses the minimum version supported by the object type, i.e.:

  • v0_tagless if the set does not have tags
  • v1_tags if the set has tags.

Decode Gtid sets using whatever format is encoded in the object.

Decode Gtids/Tsids/Uuids/Tags using v1 (which coincides with v2 for these objects).

Constructor & Destructor Documentation

◆ Gtid_binary_format() [1/2]

mysql::strconv::Gtid_binary_format::Gtid_binary_format ( )
default

◆ Gtid_binary_format() [2/2]

constexpr mysql::strconv::Gtid_binary_format::Gtid_binary_format ( const Version_policy version_policy)
inlineexplicitconstexpr

Member Function Documentation

◆ parent()

auto mysql::strconv::Gtid_binary_format::parent ( ) const
inline

◆ to_version_policy()

static Version_policy mysql::strconv::Gtid_binary_format::to_version_policy ( Version  version)
inlinestatic

Returns the Version_policy that specifies the given concrete version.

Member Data Documentation

◆ m_version_policy

Version_policy mysql::strconv::Gtid_binary_format::m_version_policy = Version_policy::automatic

Policy for the version to use.

Note: user code should rely on the default, which is automatic. Other modes are available only for unittests.


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