![]() |
MySQL 26.10.0
Source Code Documentation
|
Executes text queries and prepared statements through component services. More...
#include <mrs_component_command_executor.h>
Classes | |
| class | Connection_error |
Public Types | |
| enum class | Mode : uint8_t { Query , PreparedStatement } |
Public Member Functions | |
| ~Command_executor () | |
| Command_executor ()=delete | |
| Command_executor (const Command_executor &)=delete | |
| Command_executor & | operator= (const Command_executor &)=delete |
| Command_executor (Command_executor &&)=delete | |
| Command_executor & | operator= (Command_executor &&)=delete |
| void | set_query (const std::string &query_text) |
| void | execute (Resultset *result=nullptr) |
| void | bind_param (uint32_t index, const std::string &value, uint64_t type, bool is_unsigned=false) |
| void | bind_param (uint32_t index, const char *value, uint64_t type, bool is_unsigned=false) |
| template<typename T > | |
| void | bind_param (uint32_t index, const T &value, uint64_t type, bool is_unsigned=false) |
| bool | fetch (my_h_row *row) |
| uint64_t | affected_rows () |
| uint64_t | last_insert_id () |
| std::string | escape_string (const std::string &input) |
| bool | is_explicit_mode () const |
| Mode | mode () const |
| const std::string & | get_query () const |
| std::string | get_last_error () const |
| int | get_last_error_code () const |
| std::optional< uint64_t > | get_uint64_result () |
| std::optional< int64_t > | get_int64_result () |
| std::optional< double > | get_double_result () |
| std::optional< std::string > | get_string_result () |
Static Public Member Functions | |
| static Command_executor | make_with_current_ctx (Mode mode) |
| static Command_executor | make_with_explicit_ctx (std::string user, std::string host, Mode mode) |
Private Member Functions | |
| Command_executor (Mode mode, bool threaded_mode, std::optional< std::string > connect_user=std::nullopt, std::optional< std::string > connect_host=std::nullopt) | |
| void | connect () |
| void | cleanup () |
| void | reset () noexcept |
| void | execute_query (Resultset *result) |
| void | execute_statement (Resultset *result) |
| std::string | fetch_column_as_string (my_h_statement stmt, my_h_row row, uint32_t col_index) |
Private Attributes | |
| std::string | m_query |
| Mode | m_mode |
| bool | m_explicit_ctx_mode = false |
| Mysql_command_service_session | m_command_service_session |
| my_h_statement | m_stmt = nullptr |
| MYSQL_RES_H | m_mysql_res = nullptr |
| Security_context_handle | m_security_context |
| std::string | m_connect_user |
| std::string | m_connect_host |
| unsigned int | m_last_error_code {0} |
Executes text queries and prepared statements through component services.
|
strong |
| mrs_component::Command_executor::~Command_executor | ( | ) |
|
delete |
|
delete |
|
delete |
|
private |
| uint64_t mrs_component::Command_executor::affected_rows | ( | ) |
|
inline |
| void mrs_component::Command_executor::bind_param | ( | uint32_t | index, |
| const std::string & | value, | ||
| uint64_t | type, | ||
| bool | is_unsigned = false |
||
| ) |
|
inline |
|
private |
|
private |
| std::string mrs_component::Command_executor::escape_string | ( | const std::string & | input | ) |
|
private |
|
private |
| bool mrs_component::Command_executor::fetch | ( | my_h_row * | row | ) |
|
private |
| std::optional< double > mrs_component::Command_executor::get_double_result | ( | ) |
| std::optional< int64_t > mrs_component::Command_executor::get_int64_result | ( | ) |
| std::string mrs_component::Command_executor::get_last_error | ( | ) | const |
|
inline |
|
inline |
| std::optional< std::string > mrs_component::Command_executor::get_string_result | ( | ) |
| std::optional< uint64_t > mrs_component::Command_executor::get_uint64_result | ( | ) |
|
inline |
| uint64_t mrs_component::Command_executor::last_insert_id | ( | ) |
|
static |
|
static |
|
inline |
|
delete |
|
delete |
|
privatenoexcept |
| void mrs_component::Command_executor::set_query | ( | const std::string & | query_text | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |