MySQL 8.4.2
Source Code Documentation
ClientSideClassicProtocolState Class Reference

#include <classic_protocol_state.h>

Inheritance diagram for ClientSideClassicProtocolState:
[legend]

Public Types

enum class  AccessMode { ReadWrite , ReadOnly }
 
using PreparedStatements = std::unordered_map< uint32_t, PreparedStatement >
 
- Public Types inherited from ClassicProtocolState
enum class  HandshakeState { kConnected , kServerGreeting , kClientGreeting , kFinished }
 

Public Member Functions

void password (std::optional< std::string > pw)
 
const std::optional< std::string > & password () const
 
classic_protocol::status::value_type status_flags () const
 
void status_flags (classic_protocol::status::value_type val)
 
const PreparedStatementsprepared_statements () const
 
PreparedStatementsprepared_statements ()
 
bool trace_commands () const
 trace the events of the commands. More...
 
void trace_commands (bool val)
 
void gtid_executed (const std::string &gtid_execed)
 
std::string gtid_executed () const
 
void wait_for_my_writes (bool v)
 
bool wait_for_my_writes () const
 
std::chrono::seconds wait_for_my_writes_timeout () const
 
void wait_for_my_writes_timeout (std::chrono::seconds timeout)
 
std::optional< AccessModeaccess_mode () const
 
void access_mode (std::optional< AccessMode > v)
 
 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)
 
- Public Member Functions inherited from ClassicProtocolState
 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 ()
 
const std::optional< FrameInfo > & current_frame () const
 
std::optional< uint8_t > & current_msg_type ()
 
const std::optional< uint8_t > & current_msg_type () const
 
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)
 
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)
 
SystemVariablessystem_variables ()
 
const SystemVariablessystem_variables () const
 

Private Attributes

std::optional< std::string > password_
 
classic_protocol::status::value_type status_flags_ {}
 
PreparedStatements prepared_stmts_
 
bool trace_commands_ {false}
 
std::string gtid_executed_
 
bool wait_for_my_writes_ {true}
 
std::chrono::seconds wait_for_my_writes_timeout_ {1}
 
std::optional< AccessModeaccess_mode_ {}
 

Additional Inherited Members

- Public Attributes inherited from ClassicProtocolState
uint64_t columns_left {}
 
uint32_t params_left {}
 

Member Typedef Documentation

◆ PreparedStatements

Member Enumeration Documentation

◆ AccessMode

Enumerator
ReadWrite 
ReadOnly 

Member Function Documentation

◆ access_mode() [1/2]

std::optional< AccessMode > ClientSideClassicProtocolState::access_mode ( ) const
inline

◆ access_mode() [2/2]

void ClientSideClassicProtocolState::access_mode ( std::optional< AccessMode v)
inline

◆ 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

◆ gtid_executed() [1/2]

std::string ClientSideClassicProtocolState::gtid_executed ( ) const
inline

◆ gtid_executed() [2/2]

void ClientSideClassicProtocolState::gtid_executed ( const std::string &  gtid_execed)
inline

◆ password() [1/2]

const std::optional< std::string > & ClientSideClassicProtocolState::password ( ) const
inline

◆ password() [2/2]

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

◆ prepared_statements() [1/2]

PreparedStatements & ClientSideClassicProtocolState::prepared_statements ( )
inline

◆ prepared_statements() [2/2]

const PreparedStatements & ClientSideClassicProtocolState::prepared_statements ( ) const
inline

◆ status_flags() [1/2]

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

◆ status_flags() [2/2]

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

◆ trace_commands() [1/2]

bool ClientSideClassicProtocolState::trace_commands ( ) const
inline

trace the events of the commands.

  • enabled by ROUTER SET trace = 1
  • disabled by ROUTER SET trace = 0, change-user or reset-connection.
Return values
trueif 'ROUTER SET trace' is '1'
falseif 'ROUTER SET trace' is '0'

◆ trace_commands() [2/2]

void ClientSideClassicProtocolState::trace_commands ( bool  val)
inline

◆ wait_for_my_writes() [1/2]

bool ClientSideClassicProtocolState::wait_for_my_writes ( ) const
inline

◆ wait_for_my_writes() [2/2]

void ClientSideClassicProtocolState::wait_for_my_writes ( bool  v)
inline

◆ wait_for_my_writes_timeout() [1/2]

std::chrono::seconds ClientSideClassicProtocolState::wait_for_my_writes_timeout ( ) const
inline

◆ wait_for_my_writes_timeout() [2/2]

void ClientSideClassicProtocolState::wait_for_my_writes_timeout ( std::chrono::seconds  timeout)
inline

Member Data Documentation

◆ access_mode_

std::optional<AccessMode> ClientSideClassicProtocolState::access_mode_ {}
private

◆ gtid_executed_

std::string ClientSideClassicProtocolState::gtid_executed_
private

◆ password_

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

◆ prepared_stmts_

PreparedStatements ClientSideClassicProtocolState::prepared_stmts_
private

◆ status_flags_

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

◆ trace_commands_

bool ClientSideClassicProtocolState::trace_commands_ {false}
private

◆ wait_for_my_writes_

bool ClientSideClassicProtocolState::wait_for_my_writes_ {true}
private

◆ wait_for_my_writes_timeout_

std::chrono::seconds ClientSideClassicProtocolState::wait_for_my_writes_timeout_ {1}
private

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