MySQL 8.0.39
Source Code Documentation
Mysql::Tools::Dump::Program Class Reference

#include <program.h>

Inheritance diagram for Mysql::Tools::Dump::Program:
[legend]

Public Member Functions

 Program ()
 
 ~Program () override
 
std::string get_version () override
 Returns string describing current version of this program. More...
 
int get_first_release_year () override
 Returns year of first release of this program. More...
 
std::string get_description () override
 Returns string describing shortly current program. More...
 
int execute (const std::vector< std::string > &positional_options) override
 Runs main program code. More...
 
void create_options () override
 Creates all options that will be provided. More...
 
void error (const Mysql::Tools::Base::Message_data &message) override
 Handles general errors. More...
 
void short_usage () override
 Prints program invocation message. More...
 
void check_mutually_exclusive_options ()
 
int get_total_connections ()
 
int get_error_code () override
 Return error code. More...
 
- Public Member Functions inherited from Mysql::Tools::Base::Abstract_connection_program
MYSQLcreate_connection () override
 Provides new connection to MySQL database server based on option values. More...
 
CHARSET_INFOget_current_charset () const
 Retrieves charset that will be used in new MySQL connections. More...
 
void set_current_charset (CHARSET_INFO *charset)
 Sets charset that will be used in new MySQL connections. More...
 
- Public Member Functions inherited from Mysql::Tools::Base::Abstract_program
 ~Abstract_program () override
 
const std::string get_name ()
 Returns null-terminated string with name of current program. More...
 
my_optionget_options_array ()
 Returns pointer to array of options for usage in handle_options. More...
 
void run (int argc, char **argv)
 Does all initialization and exit work, calls execute(). More...
 
- Public Member Functions inherited from Mysql::Tools::Base::Options::Composite_options_provider
void add_providers (I_options_provider *first,...)
 Adds new providers to list. More...
 
void add_provider (I_options_provider *options_provider)
 Adds new provider to list. More...
 
void options_parsed () override
 This callback is to be called after all options were parsed. More...
 
std::vector< my_optiongenerate_options () override
 Aggregates all options from itsself and all contained providers. More...
 
- Public Member Functions inherited from Mysql::Tools::Base::Options::Abstract_options_provider
Simple_optioncreate_new_option (std::string name, std::string description)
 Creates and attach new simple option. More...
 
Disabled_optioncreate_new_disabled_option (std::string name, std::string description)
 Creates and attach new disabled option. More...
 
Char_array_optioncreate_new_option (char **value, std::string name, std::string description)
 Creates and attach new string option stored in char* type object. More...
 
Password_optioncreate_new_password_option (std::optional< std::string > *value, std::string name, std::string description)
 Creates and attach new password option. More...
 
String_optioncreate_new_option (std::optional< std::string > *value, std::string name, std::string description)
 Creates and attach new string option. More...
 
Number_option< int32 > * create_new_option (int32 *value, std::string name, std::string description)
 Creates and attach new 32-bit signed number option. More...
 
Number_option< uint32 > * create_new_option (uint32 *value, std::string name, std::string description)
 Creates and attach new 32-bit unsigned number option. More...
 
Number_option< int64 > * create_new_option (int64 *value, std::string name, std::string description)
 Creates and attach new 64-bit signed number option. More...
 
Number_option< uint64 > * create_new_option (uint64 *value, std::string name, std::string description)
 Creates and attach new 64-bit unsigned number option. More...
 
Number_option< double > * create_new_option (double *value, std::string name, std::string description)
 Creates and attach new floating-point number option. More...
 
Bool_optioncreate_new_option (bool *value, std::string name, std::string description)
 Creates and attach new boolean option with value received from argument. More...
 
template<typename T_type , typename T_typelib >
Enum_option< T_type, T_typelib > * create_new_enum_option (T_type *value, const T_typelib *type, std::string name, std::string description)
 
- Public Member Functions inherited from Mysql::Tools::Base::Options::I_option_changed_listener
virtual ~I_option_changed_listener ()=default
 
- Public Member Functions inherited from Mysql::Tools::Base::I_connection_factory
virtual ~I_connection_factory ()=default
 

Private Member Functions

bool message_handler (const Mysql::Tools::Base::Message_data &message)
 
void error_log_file_callback (char *)
 
void close_redirected_stderr ()
 

Private Attributes

Mysql_chain_element_optionsm_mysql_chain_element_options
 
Mysqldump_tool_chain_maker_optionsm_mysqldump_tool_chain_maker_options
 
bool m_single_transaction
 
bool m_watch_progress
 
std::optional< std::string > m_error_log_file
 
FILE * m_stderr
 
std::atomic< uint32_t > m_error_code
 

Additional Inherited Members

- Protected Member Functions inherited from Mysql::Tools::Base::Abstract_connection_program
 Abstract_connection_program ()
 
- Protected Member Functions inherited from Mysql::Tools::Base::Abstract_program
 Abstract_program ()
 
- Protected Member Functions inherited from Mysql::Tools::Base::Options::Abstract_options_provider
 Abstract_options_provider ()
 
 ~Abstract_options_provider () override
 
void set_option_changed_listener (I_option_changed_listener *listener) override
 Sets optional option changes listener to which all changes in all options contained in this provider should be reported. More...
 

Constructor & Destructor Documentation

◆ Program()

Program::Program ( )

◆ ~Program()

Program::~Program ( )
override

Member Function Documentation

◆ check_mutually_exclusive_options()

void Program::check_mutually_exclusive_options ( )

◆ close_redirected_stderr()

void Program::close_redirected_stderr ( )
private

◆ create_options()

void Program::create_options ( )
overridevirtual

Creates all options that will be provided.

Implements Mysql::Tools::Base::Options::Abstract_options_provider.

◆ error()

void Program::error ( const Mysql::Tools::Base::Message_data message)
overridevirtual

Handles general errors.

Implements Mysql::Tools::Base::Abstract_program.

◆ error_log_file_callback()

void Program::error_log_file_callback ( char *  )
private

◆ execute()

int Program::execute ( const std::vector< std::string > &  positional_options)
overridevirtual

Runs main program code.

Implements Mysql::Tools::Base::Abstract_program.

◆ get_description()

std::string Program::get_description ( )
overridevirtual

Returns string describing shortly current program.

Implements Mysql::Tools::Base::Abstract_program.

◆ get_error_code()

int Program::get_error_code ( )
overridevirtual

Return error code.

Implements Mysql::Tools::Base::Abstract_program.

◆ get_first_release_year()

int Program::get_first_release_year ( )
overridevirtual

Returns year of first release of this program.

Implements Mysql::Tools::Base::Abstract_program.

◆ get_total_connections()

int Program::get_total_connections ( )

◆ get_version()

std::string Program::get_version ( )
overridevirtual

Returns string describing current version of this program.

Implements Mysql::Tools::Base::Abstract_program.

◆ message_handler()

bool Program::message_handler ( const Mysql::Tools::Base::Message_data message)
private

◆ short_usage()

void Program::short_usage ( )
overridevirtual

Prints program invocation message.

Implements Mysql::Tools::Base::Abstract_program.

Member Data Documentation

◆ m_error_code

std::atomic<uint32_t> Mysql::Tools::Dump::Program::m_error_code
private

◆ m_error_log_file

std::optional<std::string> Mysql::Tools::Dump::Program::m_error_log_file
private

◆ m_mysql_chain_element_options

Mysql_chain_element_options* Mysql::Tools::Dump::Program::m_mysql_chain_element_options
private

◆ m_mysqldump_tool_chain_maker_options

Mysqldump_tool_chain_maker_options* Mysql::Tools::Dump::Program::m_mysqldump_tool_chain_maker_options
private

◆ m_single_transaction

bool Mysql::Tools::Dump::Program::m_single_transaction
private

◆ m_stderr

FILE* Mysql::Tools::Dump::Program::m_stderr
private

◆ m_watch_progress

bool Mysql::Tools::Dump::Program::m_watch_progress
private

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