MySQL 26.7.0
Source Code Documentation
mysql::csa::Event_file_metadata Class Reference

Represents basic event metadata: type and length. More...

#include <event_file_metadata.h>

Public Types

using Type = mysql::binlog::event::Log_event_type
 

Public Member Functions

 Event_file_metadata ()=default
 
 Event_file_metadata (const Event_metadata &ev_meta, const std::string &file_name, std::size_t file_position, Log_event *ev)
 Construct. More...
 
 Event_file_metadata (const Event_metadata &ev_meta, const std::string &file_name, std::size_t file_position, Log_event *ev, std::optional< Event_payload > data)
 
 Event_file_metadata (const Event_metadata &ev_meta, const std::string &file_name, std::size_t file_position, const std::string &query, bool is_atomic_ddl, Log_event *ev)
 Construct. More...
 
std::size_t get_length () const
 Event length accessor. More...
 
Type get_type () const
 Event type accessor. More...
 
std::string get_file_name () const
 Event location accessor. More...
 
std::size_t get_file_pos () const
 Event location accessor. More...
 
bool is_ignorable () const
 Returns information on whether this event is ignorable. More...
 
const std::string & get_query () const
 Returns query string if type is QUERY_LOG_EVENT, otherwise, empty string. More...
 
bool is_atomic_ddl () const
 Is atomic DDL flag if any. More...
 
bool is_valid () const
 We allow to construct empty objects, this function returns true in case object was initialized with data. More...
 
bool is_in_same_file (const Event_file_metadata &arg) const
 Compares two events and returns true if they are placed in the same location. More...
 
bool has_payload () const
 
bool has_event () const
 
const Event_payloadget_payload () const
 
std::shared_ptr< Log_eventget_event ()
 
void clear_file_metadata ()
 

Private Attributes

Event_metadata m_event_metadata
 Log event metadata. More...
 
std::string m_file_name
 Log event file location: file name. More...
 
std::size_t m_file_postion
 Log event file location: file position. More...
 
std::string m_query {""}
 Query is needed to check transaction boundary, filled if type is QUERY_LOG_EVENT. More...
 
bool m_is_atomic_ddl {false}
 "is atomic DDL" flag, filled if type is QUERY_LOG_EVENT More...
 
std::shared_ptr< Log_eventm_event
 Decoded event, if available. More...
 
std::optional< Event_payloadm_data
 Payload raw data, if any. More...
 

Detailed Description

Represents basic event metadata: type and length.

Member Typedef Documentation

◆ Type

Constructor & Destructor Documentation

◆ Event_file_metadata() [1/4]

mysql::csa::Event_file_metadata::Event_file_metadata ( )
default

◆ Event_file_metadata() [2/4]

mysql::csa::Event_file_metadata::Event_file_metadata ( const Event_metadata ev_meta,
const std::string &  file_name,
std::size_t  file_position,
Log_event ev 
)
inline

Construct.

◆ Event_file_metadata() [3/4]

mysql::csa::Event_file_metadata::Event_file_metadata ( const Event_metadata ev_meta,
const std::string &  file_name,
std::size_t  file_position,
Log_event ev,
std::optional< Event_payload data 
)
inline

◆ Event_file_metadata() [4/4]

mysql::csa::Event_file_metadata::Event_file_metadata ( const Event_metadata ev_meta,
const std::string &  file_name,
std::size_t  file_position,
const std::string &  query,
bool  is_atomic_ddl,
Log_event ev 
)
inline

Construct.

Member Function Documentation

◆ clear_file_metadata()

void mysql::csa::Event_file_metadata::clear_file_metadata ( )
inline

◆ get_event()

std::shared_ptr< Log_event > mysql::csa::Event_file_metadata::get_event ( )
inline

◆ get_file_name()

std::string mysql::csa::Event_file_metadata::get_file_name ( ) const
inline

Event location accessor.

Returns
Log event file location: file name

◆ get_file_pos()

std::size_t mysql::csa::Event_file_metadata::get_file_pos ( ) const
inline

Event location accessor.

Returns
Log event file location: file position

◆ get_length()

std::size_t mysql::csa::Event_file_metadata::get_length ( ) const
inline

Event length accessor.

Returns
Event length

◆ get_payload()

const Event_payload & mysql::csa::Event_file_metadata::get_payload ( ) const
inline

◆ get_query()

const std::string & mysql::csa::Event_file_metadata::get_query ( ) const
inline

Returns query string if type is QUERY_LOG_EVENT, otherwise, empty string.

Returns
query string if type is QUERY_LOG_EVENT, otherwise, empty string

◆ get_type()

Type mysql::csa::Event_file_metadata::get_type ( ) const
inline

Event type accessor.

Returns
Event type

◆ has_event()

bool mysql::csa::Event_file_metadata::has_event ( ) const
inline

◆ has_payload()

bool mysql::csa::Event_file_metadata::has_payload ( ) const
inline

◆ is_atomic_ddl()

bool mysql::csa::Event_file_metadata::is_atomic_ddl ( ) const
inline

Is atomic DDL flag if any.

◆ is_ignorable()

bool mysql::csa::Event_file_metadata::is_ignorable ( ) const
inline

Returns information on whether this event is ignorable.

Returns
True if event may be ignored

◆ is_in_same_file()

bool mysql::csa::Event_file_metadata::is_in_same_file ( const Event_file_metadata arg) const
inline

Compares two events and returns true if they are placed in the same location.

Returns
True in case files are in the same location, false otherwise

◆ is_valid()

bool mysql::csa::Event_file_metadata::is_valid ( void  ) const
inline

We allow to construct empty objects, this function returns true in case object was initialized with data.

Returns
True in case object was initialized with data, false otherwise

Member Data Documentation

◆ m_data

std::optional<Event_payload> mysql::csa::Event_file_metadata::m_data
private

Payload raw data, if any.

◆ m_event

std::shared_ptr<Log_event> mysql::csa::Event_file_metadata::m_event
private

Decoded event, if available.

◆ m_event_metadata

Event_metadata mysql::csa::Event_file_metadata::m_event_metadata
private

Log event metadata.

◆ m_file_name

std::string mysql::csa::Event_file_metadata::m_file_name
private

Log event file location: file name.

◆ m_file_postion

std::size_t mysql::csa::Event_file_metadata::m_file_postion
private

Log event file location: file position.

◆ m_is_atomic_ddl

bool mysql::csa::Event_file_metadata::m_is_atomic_ddl {false}
private

"is atomic DDL" flag, filled if type is QUERY_LOG_EVENT

◆ m_query

std::string mysql::csa::Event_file_metadata::m_query {""}
private

Query is needed to check transaction boundary, filled if type is QUERY_LOG_EVENT.


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