MySQL 8.0.30
Source Code Documentation
classic_protocol Namespace Reference

Namespaces

namespace  capabilities
 
namespace  clone
 
namespace  collation
 
namespace  column_def
 
namespace  cursor
 
namespace  field_type
 
namespace  frame
 
namespace  impl
 
namespace  message
 
namespace  reload_cmds
 
namespace  session_track
 
namespace  status
 
namespace  wire
 

Classes

class  AuthMethod
 AuthMethod of classic protocol. More...
 
class  Codec
 Codec for a type. More...
 
class  Codec< clone::client::Ack >
 
class  Codec< clone::client::Attach >
 
class  Codec< clone::client::Execute >
 
class  Codec< clone::client::Exit >
 
class  Codec< clone::client::Init >
 codec for clone::client::Init message. More...
 
class  Codec< clone::client::Reinit >
 
class  Codec< clone::server::Complete >
 
class  Codec< clone::server::Error >
 
class  Codec< frame::CompressedHeader >
 Codec of Compressed Header. More...
 
class  Codec< frame::Frame< PayloadType > >
 Codec for a Frame. More...
 
class  Codec< frame::Header >
 Codec of a Frame Header. More...
 
class  Codec< message::client::AuthMethodData >
 codec for client::AuthMethodData message. More...
 
class  Codec< message::client::BinlogDump >
 codec for client side dump-binlog message. More...
 
class  Codec< message::client::BinlogDumpGtid >
 codec for client side dump-binlog-with-gtid message. More...
 
class  Codec< message::client::ChangeUser >
 codec for client side change-user message. More...
 
class  Codec< message::client::Clone >
 codec for client's Clone command. More...
 
class  Codec< message::client::Greeting >
 codec for client side greeting message. More...
 
class  Codec< message::client::InitSchema >
 codec for client's InitSchema command. More...
 
class  Codec< message::client::Kill >
 codec for client's Kill command. More...
 
class  Codec< message::client::ListFields >
 codec for client's ListFields command. More...
 
class  Codec< message::client::Ping >
 codec for client's Ping command. More...
 
class  Codec< message::client::Query >
 codec for client's Query command. More...
 
class  Codec< message::client::Quit >
 codec for client's Quit command. More...
 
class  Codec< message::client::RegisterReplica >
 codec for client side register-replica message. More...
 
class  Codec< message::client::Reload >
 codec for client's Reload command. More...
 
class  Codec< message::client::ResetConnection >
 codec for client's ResetConnection command. More...
 
class  Codec< message::client::SendFile >
 codec for client::SendFile message. More...
 
class  Codec< message::client::Statistics >
 codec for client's Statistics command. More...
 
class  Codec< message::client::StmtClose >
 codec for client's Close Statement command. More...
 
class  Codec< message::client::StmtExecute >
 codec for client's Execute Statement command. More...
 
class  Codec< message::client::StmtFetch >
 codec for client's Fetch Cursor command. More...
 
class  Codec< message::client::StmtParamAppendData >
 codec for client's append data Statement command. More...
 
class  Codec< message::client::StmtPrepare >
 codec for client's Prepared Statement command. More...
 
class  Codec< message::client::StmtReset >
 codec for client's Reset Statement command. More...
 
class  Codec< message::client::StmtSetOption >
 codec for client's SetOption Cursor command. More...
 
class  Codec< message::server::AuthMethodData >
 codec for server::AuthMethodData message. More...
 
class  Codec< message::server::AuthMethodSwitch >
 codec for server::AuthMethodSwitch message. More...
 
class  Codec< message::server::ColumnCount >
 codec for ColumnCount message. More...
 
class  Codec< message::server::ColumnMeta >
 Codec of ColumnMeta. More...
 
class  Codec< message::server::Eof >
 codec for server-side Eof message. More...
 
class  Codec< message::server::Error >
 codec for Error message. More...
 
class  Codec< message::server::Greeting >
 codec for server Greeting message. More...
 
class  Codec< message::server::Ok >
 codec for server-side Ok message. More...
 
class  Codec< message::server::Row >
 codec for a Row from the server. More...
 
class  Codec< message::server::SendFileRequest >
 codec for server's SendFileRequest response. More...
 
class  Codec< message::server::Statistics >
 codec for server::Statistics message. More...
 
class  Codec< message::server::StmtPrepareOk >
 codec for server::StmtPrepareOk message. More...
 
class  Codec< message::server::StmtRow >
 codec for a StmtRow from the server. More...
 
class  Codec< session_track::Field >
 codec for session-track's Field. More...
 
class  Codec< session_track::Gtid >
 codec for session_track::Gtid. More...
 
class  Codec< session_track::Schema >
 codec for session_track::Schema. More...
 
class  Codec< session_track::State >
 codec for session_track::State. More...
 
class  Codec< session_track::SystemVariable >
 codec for session_track::SystemVariable. More...
 
class  Codec< session_track::TransactionCharacteristics >
 codec for session_track::TransactionCharacteristics. More...
 
class  Codec< session_track::TransactionState >
 codec for session_track::TransactionState. More...
 
class  Codec< void >
 codec for ignorable bytes. More...
 
class  Codec< wire::FixedInt< IntSize > >
 codec of a FixedInt. More...
 
class  Codec< wire::Null >
 codec for a NULL value in the Resultset. More...
 
class  Codec< wire::NulTermString >
 codec for 0-terminated string. More...
 
class  Codec< wire::String >
 codec for wire::String. More...
 
class  Codec< wire::VarInt >
 codec for variable length integers. More...
 
class  Codec< wire::VarString >
 codec for string with known length. More...
 
class  CodecSimpleCommand
 CRTP base for client-side commands that are encoded as a single byte. More...
 
class  PartialBufferSequence
 partial buffer sequence. More...
 
class  PartialBufferSequence< net::const_buffer >
 partial buffer sequence. More...
 

Enumerations

enum class  codec_errc {
  invalid_input = 1 , not_enough_input , missing_nul_term , capability_not_supported ,
  statement_id_not_found , field_type_unknown
}
 
enum class  CommandByte {
  Quit = 0x01 , InitSchema , Query , ListFields ,
  CreateDb , DropDb , Refresh , Shutdown ,
  Statistics , ProcessInfo , Connect , ProcessKill ,
  Debug , Ping , Time , DelayedInsert ,
  ChangeUser , BinlogDump , TableDump , ConnectOut ,
  RegisterReplica , StmtPrepare , StmtExecute , StmtSendLongData ,
  StmtClose , StmtReset , SetOption , StmtFetch ,
  Deamon , BinlogDumpGtid , ResetConnection , Clone
}
 

Functions

constexpr size_t bytes_per_bits (size_t bits)
 
template<class T , class DynamicBuffer >
stdx::expected< size_t, std::error_code > encode (const T &v, capabilities::value_type caps, DynamicBuffer &&dyn_buffer)
 encode a message into a dynamic buffer. More...
 
template<class T , class ConstBufferSequence >
stdx::expected< std::pair< size_t, T >, std::error_code > decode (const ConstBufferSequence &buffers, capabilities::value_type caps)
 decode a message from a buffer sequence. More...
 
const std::error_category & codec_category () noexcept
 
std::error_code make_error_code (codec_errc e) noexcept
 

Enumeration Type Documentation

◆ codec_errc

enum class classic_protocol::codec_errc
strong
Enumerator
invalid_input 
not_enough_input 
missing_nul_term 
capability_not_supported 
statement_id_not_found 
field_type_unknown 

◆ CommandByte

enum class classic_protocol::CommandByte
strong
Enumerator
Quit 
InitSchema 
Query 
ListFields 
CreateDb 
DropDb 
Refresh 
Shutdown 
Statistics 
ProcessInfo 
Connect 
ProcessKill 
Debug 
Ping 
Time 
DelayedInsert 
ChangeUser 
BinlogDump 
TableDump 
ConnectOut 
RegisterReplica 
StmtPrepare 
StmtExecute 
StmtSendLongData 
StmtClose 
StmtReset 
SetOption 
StmtFetch 
Deamon 
BinlogDumpGtid 
ResetConnection 
Clone 

Function Documentation

◆ bytes_per_bits()

constexpr size_t classic_protocol::bytes_per_bits ( size_t  bits)
constexpr

◆ codec_category()

const std::error_category & classic_protocol::codec_category ( )
inlinenoexcept

◆ decode()

template<class T , class ConstBufferSequence >
stdx::expected< std::pair< size_t, T >, std::error_code > classic_protocol::decode ( const ConstBufferSequence &  buffers,
capabilities::value_type  caps 
)

decode a message from a buffer sequence.

Parameters
buffersbuffer sequence to read from
capsprotocol capabilities
Returns
number of bytes read from 'buffers' and a T on success, or std::error_code on error

◆ encode()

template<class T , class DynamicBuffer >
stdx::expected< size_t, std::error_code > classic_protocol::encode ( const T &  v,
capabilities::value_type  caps,
DynamicBuffer &&  dyn_buffer 
)

encode a message into a dynamic buffer.

Parameters
vmessage to encode
capsprotocol capabilities
dyn_bufferdynamic buffer to write into
Returns
number of bytes written into dynamic buffer or std::error_code on error

◆ make_error_code()

std::error_code classic_protocol::make_error_code ( codec_errc  e)
inlinenoexcept