MySQL 9.0.0
Source Code Documentation
sp_condition_value Class Reference

This class represents condition-value term in DECLARE CONDITION or DECLARE HANDLER statements. More...

#include <sp_pcontext.h>

Public Types

enum  enum_type {
  ERROR_CODE , SQLSTATE , WARNING , NOT_FOUND ,
  EXCEPTION
}
 

Public Member Functions

 sp_condition_value (uint _mysqlerr)
 
 sp_condition_value (const char *_sql_state)
 
 sp_condition_value (enum_type _type)
 
void print (String *str) const
 Print a condition_value in human-readable form. More...
 
bool equals (const sp_condition_value *cv) const
 Check if two instances of sp_condition_value are equal or not. More...
 

Public Attributes

enum_type type
 Type of the condition value. More...
 
char sql_state [SQLSTATE_LENGTH+1]
 SQLSTATE of the condition value. More...
 
uint mysqlerr
 MySQL error code of the condition value. More...
 

Detailed Description

This class represents condition-value term in DECLARE CONDITION or DECLARE HANDLER statements.

sp_condition_value has little to do with SQL-conditions.

In some sense, this class is a union – a set of filled attributes depends on the sp_condition_value::type value.

Member Enumeration Documentation

◆ enum_type

Enumerator
ERROR_CODE 
SQLSTATE 
WARNING 
NOT_FOUND 
EXCEPTION 

Constructor & Destructor Documentation

◆ sp_condition_value() [1/3]

sp_condition_value::sp_condition_value ( uint  _mysqlerr)
inline

◆ sp_condition_value() [2/3]

sp_condition_value::sp_condition_value ( const char *  _sql_state)
inline

◆ sp_condition_value() [3/3]

sp_condition_value::sp_condition_value ( enum_type  _type)
inline

Member Function Documentation

◆ equals()

bool sp_condition_value::equals ( const sp_condition_value cv) const

Check if two instances of sp_condition_value are equal or not.

Parameters
cvanother instance of sp_condition_value to check.
Returns
true if the instances are equal, false otherwise.

◆ print()

void sp_condition_value::print ( String str) const

Print a condition_value in human-readable form.

Parameters
strThe variable to print to.

Member Data Documentation

◆ mysqlerr

uint sp_condition_value::mysqlerr

MySQL error code of the condition value.

◆ sql_state

char sp_condition_value::sql_state[SQLSTATE_LENGTH+1]

SQLSTATE of the condition value.

◆ type

enum_type sp_condition_value::type

Type of the condition value.


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