MySQL 8.0.40
Source Code Documentation
Replacement Class Reference

#include <rule.h>

Public Member Functions

bool load (MYSQL_THD thd, const std::string replacement)
 Load the replacement query string. More...
 
std::string parse_error_message ()
 If any errors were raised during parsing, the first one is available here. More...
 
std::vector< int > slots () const
 

Public Attributes

std::string query_string
 The query string of the replacement. More...
 
int number_parameters
 The number of parameters (and the size of m_param_slots and parameter_positions.) More...
 

Private Attributes

std::vector< int > m_param_slots
 The positions in query_string of each parameter ('?') More...
 
std::string m_parse_error_message
 

Member Function Documentation

◆ load()

bool Replacement::load ( MYSQL_THD  thd,
const std::string  replacement 
)

Load the replacement query string.

It means:

  • extract the number of parameters
  • extract the position of the parameters in the query string
  • copy the replacement in the rewrite rule

◆ parse_error_message()

std::string Replacement::parse_error_message ( )
inline

If any errors were raised during parsing, the first one is available here.

◆ slots()

std::vector< int > Replacement::slots ( ) const
inline

Member Data Documentation

◆ m_param_slots

std::vector<int> Replacement::m_param_slots
private

The positions in query_string of each parameter ('?')

◆ m_parse_error_message

std::string Replacement::m_parse_error_message
private

◆ number_parameters

int Replacement::number_parameters

The number of parameters (and the size of m_param_slots and parameter_positions.)

◆ query_string

std::string Replacement::query_string

The query string of the replacement.


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