MySQL 9.1.0
Source Code Documentation
Expected_warnings Class Reference

Class representing any one of the following list. More...

#include <expected_warnings.h>

Public Types

typedef std::vector< std::unique_ptr< Warning > >::iterator iterator
 

Public Member Functions

 Expected_warnings ()=default
 
 ~Expected_warnings ()=default
 
iterator begin ()
 
iterator end ()
 
std::size_t count ()
 Return length of the list containing warnings. More...
 
void clear_list ()
 Delete all warnings from the vector. More...
 
void add_warning (std::uint32_t warning_code, const char *warning_name, bool once_property)
 Add a new warning to the existing list of warnings only if it doesn't exist. More...
 
void remove_warning (std::uint32_t warning_code, bool once_property)
 Remove a warning from the existing list of warnings if it exists. More...
 
void update_list ()
 Update the list of disabled or enabled warnings. More...
 
std::string warnings_list ()
 Return a list of symbolic names of disabled or enabled warnings. More...
 

Private Attributes

std::vector< std::unique_ptr< Warning > > m_warnings
 

Detailed Description

Class representing any one of the following list.

  • List of disabled warnings
  • List of enabled warnings

Member Typedef Documentation

◆ iterator

typedef std::vector<std::unique_ptr<Warning>>::iterator Expected_warnings::iterator

Constructor & Destructor Documentation

◆ Expected_warnings()

Expected_warnings::Expected_warnings ( )
default

◆ ~Expected_warnings()

Expected_warnings::~Expected_warnings ( )
default

Member Function Documentation

◆ add_warning()

void Expected_warnings::add_warning ( std::uint32_t  warning_code,
const char *  warning_name,
bool  once_property 
)

Add a new warning to the existing list of warnings only if it doesn't exist.

Parameters
warning_codeWarning number
warning_nameWarning name
once_propertyFlag value representing the scope of a warning.

◆ begin()

iterator Expected_warnings::begin ( )
inline

◆ clear_list()

void Expected_warnings::clear_list ( )
inline

Delete all warnings from the vector.

◆ count()

std::size_t Expected_warnings::count ( )
inline

Return length of the list containing warnings.

Return values
Lengthvalue

◆ end()

iterator Expected_warnings::end ( )
inline

◆ remove_warning()

void Expected_warnings::remove_warning ( std::uint32_t  warning_code,
bool  once_property 
)

Remove a warning from the existing list of warnings if it exists.

If "ONCE" argument is specified, don't remove the warning, set a flag to ignore disabling or enabling of it for the next statement only.

Parameters
warning_codeWarning number
once_propertyFlag value representing the scope of a disabled warning

◆ update_list()

void Expected_warnings::update_list ( )

Update the list of disabled or enabled warnings.

  • Remove all the warnings which are disabled or enabled only for one statement. These warnings are expired after the execution of next statement.
  • Reset ignore_warning flag value to 0 if it set to 1.

◆ warnings_list()

std::string Expected_warnings::warnings_list ( )

Return a list of symbolic names of disabled or enabled warnings.

Return values
Stringcontaining symbolic names of disabled warnings

Member Data Documentation

◆ m_warnings

std::vector<std::unique_ptr<Warning> > Expected_warnings::m_warnings
private

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