MySQL 8.0.40
Source Code Documentation
Condition_information_item Class Reference

A condition information item. More...

#include <sql_get_diagnostics.h>

Inheritance diagram for Condition_information_item:
[legend]

Public Types

enum  Name {
  CLASS_ORIGIN , SUBCLASS_ORIGIN , CONSTRAINT_CATALOG , CONSTRAINT_SCHEMA ,
  CONSTRAINT_NAME , CATALOG_NAME , SCHEMA_NAME , TABLE_NAME ,
  COLUMN_NAME , CURSOR_NAME , MESSAGE_TEXT , MYSQL_ERRNO ,
  RETURNED_SQLSTATE
}
 The name of a condition information item. More...
 

Public Member Functions

 Condition_information_item (Name name, Item *target)
 Constructor, used to represent a condition information item. More...
 
Itemget_value (THD *thd, const Sql_condition *cond)
 Obtain value of this condition information item. More...
 
- Public Member Functions inherited from Diagnostics_information_item
bool set_value (THD *thd, Item **value)
 Set a value for this item. More...
 

Private Member Functions

Itemmake_utf8_string_item (THD *thd, const String *str)
 Create an string item to represent a condition item string. More...
 

Private Attributes

Name m_name
 The name of this condition information item. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Diagnostics_information_item
 Diagnostics_information_item (Item *target)
 Constructor, used to represent a diagnostics information item. More...
 
virtual ~Diagnostics_information_item ()
 Diagnostics_information_item objects are allocated in thd->mem_root. More...
 

Detailed Description

A condition information item.

Member Enumeration Documentation

◆ Name

The name of a condition information item.

Enumerator
CLASS_ORIGIN 
SUBCLASS_ORIGIN 
CONSTRAINT_CATALOG 
CONSTRAINT_SCHEMA 
CONSTRAINT_NAME 
CATALOG_NAME 
SCHEMA_NAME 
TABLE_NAME 
COLUMN_NAME 
CURSOR_NAME 
MESSAGE_TEXT 
MYSQL_ERRNO 
RETURNED_SQLSTATE 

Constructor & Destructor Documentation

◆ Condition_information_item()

Condition_information_item::Condition_information_item ( Name  name,
Item target 
)
inline

Constructor, used to represent a condition information item.

Parameters
nameThe name of this item.
targetA target that gets the value of this item.

Member Function Documentation

◆ get_value()

Item * Condition_information_item::get_value ( THD thd,
const Sql_condition cond 
)

Obtain value of this condition information item.

Obtain the value of this condition information item in the context of a given condition.

Parameters
thdThe current thread.
condThe SQL condition.
Return values
Itemrepresenting the value.
NULLon error.

◆ make_utf8_string_item()

Item * Condition_information_item::make_utf8_string_item ( THD thd,
const String str 
)
private

Create an string item to represent a condition item string.

Create an UTF-8 string item to represent a condition item string.

Remarks
The string might not have a associated charset. For example, this can be the case if the server does not or fails to process the error message file.
See "Design notes about Sql_condition::m_message_text." in sql_error.cc
Returns
Pointer to an string item, NULL on failure.

Member Data Documentation

◆ m_name

Name Condition_information_item::m_name
private

The name of this condition information item.


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