MySQL 26.7.0
Source Code Documentation
ib::redo::Record_view Class Reference

This class represents a parsed redo record. More...

#include <log0redo.h>

Classes

struct  Aux_tag
 Auxiliary record tag. More...
 
struct  Page_tag
 Page data record tag. More...
 
struct  Space_tag
 Table space tag. More...
 
struct  Table_tag
 Table metadata tag. More...
 
union  Tag
 

Public Types

enum class  Kind { Aux , Page , Table , Space }
 Possible record kinds. More...
 

Public Member Functions

template<typename Tag >
constexpr Record_view (int type, size_t size, std::span< const uint8_t > body, Tag &&tag)
 
constexpr Kind kind () const noexcept
 Returns record kind. More...
 
constexpr int type () const noexcept
 Returns record type with MLOG_SINGLE_REC_FLAG cleared. More...
 
constexpr size_t size () const noexcept
 Returns record size in bytes occupied in the parsing buffer. More...
 
constexpr std::span< const uint8_t > body () const noexcept
 Returns reference to record body. More...
 
constexpr const Page_tagpage () const noexcept
 Returns page data tag. More...
 
constexpr const Table_tagtable () const noexcept
 Returns table metadata tag. More...
 
constexpr const Space_tagspace () const noexcept
 Returns table space tag. More...
 

Private Attributes

Kind m_kind
 
int m_type
 Record type with MLOG_SINGLE_REC_FLAG cleared. More...
 
size_t m_size
 Full record size in bytes occupied in the parsing buffer. More...
 
std::span< const uint8_t > m_body
 Record data excluding what consumed by m_type and m_tag. More...
 
union ib::redo::Record_view::Tag m_tag
 

Detailed Description

This class represents a parsed redo record.

Note
The body field refers to the original parsing buffer, so a caller must ensure that the buffer's lifetime is not less than the parsed record's lifetime.

Member Enumeration Documentation

◆ Kind

enum class ib::redo::Record_view::Kind
strong

Possible record kinds.

Enumerator
Aux 

Auxiliary record.

Page 

Page data record.

Table 

Table metadata record.

Space 

Table space record.

Constructor & Destructor Documentation

◆ Record_view()

template<typename Tag >
constexpr ib::redo::Record_view::Record_view ( int  type,
size_t  size,
std::span< const uint8_t >  body,
Tag &&  tag 
)
inlineconstexpr

Member Function Documentation

◆ body()

constexpr std::span< const uint8_t > ib::redo::Record_view::body ( ) const
inlineconstexprnoexcept

Returns reference to record body.

◆ kind()

constexpr Kind ib::redo::Record_view::kind ( ) const
inlineconstexprnoexcept

Returns record kind.

◆ page()

constexpr const Page_tag & ib::redo::Record_view::page ( ) const
inlineconstexprnoexcept

Returns page data tag.

◆ size()

constexpr size_t ib::redo::Record_view::size ( ) const
inlineconstexprnoexcept

Returns record size in bytes occupied in the parsing buffer.

◆ space()

constexpr const Space_tag & ib::redo::Record_view::space ( ) const
inlineconstexprnoexcept

Returns table space tag.

◆ table()

constexpr const Table_tag & ib::redo::Record_view::table ( ) const
inlineconstexprnoexcept

Returns table metadata tag.

◆ type()

constexpr int ib::redo::Record_view::type ( ) const
inlineconstexprnoexcept

Returns record type with MLOG_SINGLE_REC_FLAG cleared.

Member Data Documentation

◆ m_body

std::span<const uint8_t> ib::redo::Record_view::m_body
private

Record data excluding what consumed by m_type and m_tag.

◆ m_kind

Kind ib::redo::Record_view::m_kind
private

◆ m_size

size_t ib::redo::Record_view::m_size
private

Full record size in bytes occupied in the parsing buffer.

◆ m_tag

union ib::redo::Record_view::Tag ib::redo::Record_view::m_tag
private

◆ m_type

int ib::redo::Record_view::m_type
private

Record type with MLOG_SINGLE_REC_FLAG cleared.


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