MySQL 8.0.39
Source Code Documentation
ClassicProtocolState Class Reference

protocol state of a classic protocol connection. More...

#include <classic_connection_base.h>

Inheritance diagram for ClassicProtocolState:
[legend]

Classes

struct  FrameInfo
 

Public Types

enum class  HandshakeState { kConnected , kServerGreeting , kClientGreeting , kFinished }
 
using PreparedStatements = std::unordered_map< uint32_t, PreparedStatement >
 

Public Member Functions

 ClassicProtocolState ()=default
 
 ClassicProtocolState (classic_protocol::capabilities::value_type server_caps, classic_protocol::capabilities::value_type client_caps, std::optional< classic_protocol::message::server::Greeting > server_greeting, std::string username, std::string schema, std::string attributes)
 
void server_capabilities (classic_protocol::capabilities::value_type caps)
 
void client_capabilities (classic_protocol::capabilities::value_type caps)
 
classic_protocol::capabilities::value_type client_capabilities () const
 
classic_protocol::capabilities::value_type server_capabilities () const
 
classic_protocol::capabilities::value_type shared_capabilities () const
 
std::optional< classic_protocol::message::client::Greetingclient_greeting () const
 
void client_greeting (std::optional< classic_protocol::message::client::Greeting > msg)
 
std::optional< classic_protocol::message::server::Greetingserver_greeting () const
 
void server_greeting (std::optional< classic_protocol::message::server::Greeting > msg)
 
uint8_t & seq_id ()
 
uint8_t seq_id () const
 
void seq_id (uint8_t id)
 
std::optional< FrameInfo > & current_frame ()
 
std::optional< uint8_t > & current_msg_type ()
 
std::string auth_method_name () const
 
void auth_method_name (std::string name)
 
std::string auth_method_data () const
 
void auth_method_data (std::string data)
 
std::string username ()
 
void username (std::string user)
 
void password (std::optional< std::string > pw)
 
std::optional< std::string > password () const
 
std::string schema ()
 
void schema (std::string s)
 
std::string attributes ()
 
void attributes (std::string attrs)
 
std::string sent_attributes ()
 
void sent_attributes (std::string attrs)
 
HandshakeState handshake_state () const
 
void handshake_state (HandshakeState state)
 
const PreparedStatementsprepared_statements () const
 
PreparedStatementsprepared_statements ()
 
classic_protocol::status::value_type status_flags () const
 
void status_flags (classic_protocol::status::value_type val)
 
- Public Member Functions inherited from ProtocolStateBase
virtual ~ProtocolStateBase ()=default
 

Public Attributes

uint64_t columns_left {}
 
uint32_t params_left {}
 

Private Attributes

classic_protocol::capabilities::value_type server_caps_ {}
 
classic_protocol::capabilities::value_type client_caps_ {}
 
std::optional< classic_protocol::message::client::Greetingclient_greeting_ {}
 
std::optional< classic_protocol::message::server::Greetingserver_greeting_ {}
 
std::optional< FrameInfocurrent_frame_ {}
 
std::optional< uint8_t > msg_type_ {}
 
uint8_t seq_id_ {255}
 
std::string username_
 
std::optional< std::string > password_
 
std::string schema_
 
std::string recv_attributes_
 
std::string sent_attributes_
 
std::string auth_method_name_
 
std::string auth_method_data_
 
PreparedStatements prepared_stmts_
 
classic_protocol::status::value_type status_flags_ {}
 
HandshakeState handshake_state_ {HandshakeState::kConnected}
 

Detailed Description

protocol state of a classic protocol connection.

Member Typedef Documentation

◆ PreparedStatements

using ClassicProtocolState::PreparedStatements = std::unordered_map<uint32_t, PreparedStatement>

Member Enumeration Documentation

◆ HandshakeState

Enumerator
kConnected 
kServerGreeting 
kClientGreeting 
kFinished 

Constructor & Destructor Documentation

◆ ClassicProtocolState() [1/2]

ClassicProtocolState::ClassicProtocolState ( )
default

◆ ClassicProtocolState() [2/2]

ClassicProtocolState::ClassicProtocolState ( classic_protocol::capabilities::value_type  server_caps,
classic_protocol::capabilities::value_type  client_caps,
std::optional< classic_protocol::message::server::Greeting server_greeting,
std::string  username,
std::string  schema,
std::string  attributes 
)
inline

Member Function Documentation

◆ attributes() [1/2]

std::string ClassicProtocolState::attributes ( )
inline

◆ attributes() [2/2]

void ClassicProtocolState::attributes ( std::string  attrs)
inline

◆ auth_method_data() [1/2]

std::string ClassicProtocolState::auth_method_data ( ) const
inline

◆ auth_method_data() [2/2]

void ClassicProtocolState::auth_method_data ( std::string  data)
inline

◆ auth_method_name() [1/2]

std::string ClassicProtocolState::auth_method_name ( ) const
inline

◆ auth_method_name() [2/2]

void ClassicProtocolState::auth_method_name ( std::string  name)
inline

◆ client_capabilities() [1/2]

classic_protocol::capabilities::value_type ClassicProtocolState::client_capabilities ( ) const
inline

◆ client_capabilities() [2/2]

void ClassicProtocolState::client_capabilities ( classic_protocol::capabilities::value_type  caps)
inline

◆ client_greeting() [1/2]

std::optional< classic_protocol::message::client::Greeting > ClassicProtocolState::client_greeting ( ) const
inline

◆ client_greeting() [2/2]

void ClassicProtocolState::client_greeting ( std::optional< classic_protocol::message::client::Greeting msg)
inline

◆ current_frame()

std::optional< FrameInfo > & ClassicProtocolState::current_frame ( )
inline

◆ current_msg_type()

std::optional< uint8_t > & ClassicProtocolState::current_msg_type ( )
inline

◆ handshake_state() [1/2]

HandshakeState ClassicProtocolState::handshake_state ( ) const
inline

◆ handshake_state() [2/2]

void ClassicProtocolState::handshake_state ( HandshakeState  state)
inline

◆ password() [1/2]

std::optional< std::string > ClassicProtocolState::password ( ) const
inline

◆ password() [2/2]

void ClassicProtocolState::password ( std::optional< std::string >  pw)
inline

◆ prepared_statements() [1/2]

PreparedStatements & ClassicProtocolState::prepared_statements ( )
inline

◆ prepared_statements() [2/2]

const PreparedStatements & ClassicProtocolState::prepared_statements ( ) const
inline

◆ schema() [1/2]

std::string ClassicProtocolState::schema ( )
inline

◆ schema() [2/2]

void ClassicProtocolState::schema ( std::string  s)
inline

◆ sent_attributes() [1/2]

std::string ClassicProtocolState::sent_attributes ( )
inline

◆ sent_attributes() [2/2]

void ClassicProtocolState::sent_attributes ( std::string  attrs)
inline

◆ seq_id() [1/3]

uint8_t & ClassicProtocolState::seq_id ( )
inline

◆ seq_id() [2/3]

uint8_t ClassicProtocolState::seq_id ( ) const
inline

◆ seq_id() [3/3]

void ClassicProtocolState::seq_id ( uint8_t  id)
inline

◆ server_capabilities() [1/2]

classic_protocol::capabilities::value_type ClassicProtocolState::server_capabilities ( ) const
inline

◆ server_capabilities() [2/2]

void ClassicProtocolState::server_capabilities ( classic_protocol::capabilities::value_type  caps)
inline

◆ server_greeting() [1/2]

std::optional< classic_protocol::message::server::Greeting > ClassicProtocolState::server_greeting ( ) const
inline

◆ server_greeting() [2/2]

void ClassicProtocolState::server_greeting ( std::optional< classic_protocol::message::server::Greeting msg)
inline

◆ shared_capabilities()

classic_protocol::capabilities::value_type ClassicProtocolState::shared_capabilities ( ) const
inline

◆ status_flags() [1/2]

classic_protocol::status::value_type ClassicProtocolState::status_flags ( ) const
inline

◆ status_flags() [2/2]

void ClassicProtocolState::status_flags ( classic_protocol::status::value_type  val)
inline

◆ username() [1/2]

std::string ClassicProtocolState::username ( )
inline

◆ username() [2/2]

void ClassicProtocolState::username ( std::string  user)
inline

Member Data Documentation

◆ auth_method_data_

std::string ClassicProtocolState::auth_method_data_
private

◆ auth_method_name_

std::string ClassicProtocolState::auth_method_name_
private

◆ client_caps_

classic_protocol::capabilities::value_type ClassicProtocolState::client_caps_ {}
private

◆ client_greeting_

std::optional<classic_protocol::message::client::Greeting> ClassicProtocolState::client_greeting_ {}
private

◆ columns_left

uint64_t ClassicProtocolState::columns_left {}

◆ current_frame_

std::optional<FrameInfo> ClassicProtocolState::current_frame_ {}
private

◆ handshake_state_

HandshakeState ClassicProtocolState::handshake_state_ {HandshakeState::kConnected}
private

◆ msg_type_

std::optional<uint8_t> ClassicProtocolState::msg_type_ {}
private

◆ params_left

uint32_t ClassicProtocolState::params_left {}

◆ password_

std::optional<std::string> ClassicProtocolState::password_
private

◆ prepared_stmts_

PreparedStatements ClassicProtocolState::prepared_stmts_
private

◆ recv_attributes_

std::string ClassicProtocolState::recv_attributes_
private

◆ schema_

std::string ClassicProtocolState::schema_
private

◆ sent_attributes_

std::string ClassicProtocolState::sent_attributes_
private

◆ seq_id_

uint8_t ClassicProtocolState::seq_id_ {255}
private

◆ server_caps_

classic_protocol::capabilities::value_type ClassicProtocolState::server_caps_ {}
private

◆ server_greeting_

std::optional<classic_protocol::message::server::Greeting> ClassicProtocolState::server_greeting_ {}
private

◆ status_flags_

classic_protocol::status::value_type ClassicProtocolState::status_flags_ {}
private

◆ username_

std::string ClassicProtocolState::username_
private

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