MySQL 9.1.0
Source Code Documentation
services Namespace Reference

Classes

class  Array_ptr
 A very limited smart pointer to protect against stack unwinding in case an STL class throws an exception. More...
 
class  Condition_handler
 This class may inherited and passed to parse() in order to handle conditions raised by the server. More...
 
class  Digest
 
class  Lex_str
 A very limited smart pointer to protect against stack unwinding in case an STL class throws an exception. More...
 
class  Literal_visitor
 
class  Session
 

Functions

string print_digest (const unsigned char *digest)
 
static int handle (int sql_errno, const char *sqlstate, const char *message, void *state)
 Bridge function between the C++ API offered by this module and the C API of the parser service. More...
 
static MYSQL_LEX_STRING make_lex_string (const string &str)
 Convenience function, to avoid sprinkling the code with const_casts. More...
 
void set_current_database (MYSQL_THD thd, const string &db)
 
bool parse (MYSQL_THD thd, const string &query, bool is_prepared, Condition_handler *handler)
 
bool parse (MYSQL_THD thd, const string &query, bool is_prepared)
 
bool is_supported_statement (MYSQL_THD thd)
 
int get_number_params (MYSQL_THD thd)
 
static int process_item (MYSQL_ITEM item, uchar *arg)
 
bool visit_parse_tree (MYSQL_THD thd, Literal_visitor *visitor)
 
string print_item (MYSQL_ITEM item)
 Prints an Item as an std::string. More...
 
string get_current_query_normalized (MYSQL_THD thd)
 
std::vector< int > get_parameter_positions (MYSQL_THD thd)
 
void set_current_database (MYSQL_THD thd, const std::string &db)
 
bool parse (MYSQL_THD thd, const std::string &query, bool is_prepared, Condition_handler *handler)
 
bool parse (MYSQL_THD thd, const std::string &query, bool is_prepared)
 

Function Documentation

◆ get_current_query_normalized()

std::string services::get_current_query_normalized ( MYSQL_THD  thd)

◆ get_number_params()

int services::get_number_params ( MYSQL_THD  thd)

◆ get_parameter_positions()

std::vector< int > services::get_parameter_positions ( MYSQL_THD  thd)

◆ handle()

static int services::handle ( int  sql_errno,
const char *  sqlstate,
const char *  message,
void *  state 
)
static

Bridge function between the C++ API offered by this module and the C API of the parser service.

This layer always uses a Condition_handler object that is passed to mysql_parser_parse().

◆ is_supported_statement()

bool services::is_supported_statement ( MYSQL_THD  thd)

◆ make_lex_string()

static MYSQL_LEX_STRING services::make_lex_string ( const string &  str)
static

Convenience function, to avoid sprinkling the code with const_casts.

◆ parse() [1/4]

bool services::parse ( MYSQL_THD  thd,
const std::string &  query,
bool  is_prepared 
)

◆ parse() [2/4]

bool services::parse ( MYSQL_THD  thd,
const std::string &  query,
bool  is_prepared,
Condition_handler handler 
)

◆ parse() [3/4]

bool services::parse ( MYSQL_THD  thd,
const string &  query,
bool  is_prepared 
)

◆ parse() [4/4]

bool services::parse ( MYSQL_THD  thd,
const string &  query,
bool  is_prepared,
Condition_handler handler 
)

◆ print_digest()

std::string services::print_digest ( const unsigned char *  digest)

◆ print_item()

std::string services::print_item ( MYSQL_ITEM  item)

Prints an Item as an std::string.

◆ process_item()

static int services::process_item ( MYSQL_ITEM  item,
uchar arg 
)
static

◆ set_current_database() [1/2]

void services::set_current_database ( MYSQL_THD  thd,
const std::string &  db 
)

◆ set_current_database() [2/2]

void services::set_current_database ( MYSQL_THD  thd,
const string &  db 
)

◆ visit_parse_tree()

bool services::visit_parse_tree ( MYSQL_THD  thd,
Literal_visitor visitor 
)