MySQL 8.0.39
Source Code Documentation
Warning Class Reference

Class representing a warning. More...

#include <warning.h>

Public Member Functions

 Warning (std::uint32_t warning_code, const char *warning_name, bool once)
 
bool expired ()
 Check if a warning is disabled/enabled for next statement only. More...
 
bool ignore_warning ()
 Return ignore_warning flag value. More...
 
const char * warning_name ()
 Return a symbolic name representing a warning. More...
 
std::uint32_t warning_code ()
 Return a warning code. More...
 
void set_ignore_warning (bool value)
 Set ignore_warning flag. More...
 

Private Attributes

bool m_ignore_warning
 
bool m_once_property
 
std::string m_warning_name
 
std::uint32_t m_warning_code
 

Detailed Description

Class representing a warning.

Contains following information

  • A flag representing whether to ignore a warning or not
  • A flag representing the scope of a warning
  • Warning name
  • Warning number

Constructor & Destructor Documentation

◆ Warning()

Warning::Warning ( std::uint32_t  warning_code,
const char *  warning_name,
bool  once 
)
inline

Member Function Documentation

◆ expired()

bool Warning::expired ( )
inline

Check if a warning is disabled/enabled for next statement only.

Return values
Trueif the warning is disabled or enabled for next statement only, false otherwise.

◆ ignore_warning()

bool Warning::ignore_warning ( )
inline

Return ignore_warning flag value.

Return values
Trueif ignore_warning flag is set, false otherwise.

◆ set_ignore_warning()

void Warning::set_ignore_warning ( bool  value)
inline

Set ignore_warning flag.

Parameters
valueBoolean value for ignore_warning flag

◆ warning_code()

std::uint32_t Warning::warning_code ( )
inline

Return a warning code.

Return values
Warningcode

◆ warning_name()

const char * Warning::warning_name ( )
inline

Return a symbolic name representing a warning.

Return values
Symbolicname for a warning.

Member Data Documentation

◆ m_ignore_warning

bool Warning::m_ignore_warning
private

◆ m_once_property

bool Warning::m_once_property
private

◆ m_warning_code

std::uint32_t Warning::m_warning_code
private

◆ m_warning_name

std::string Warning::m_warning_name
private

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