MySQL 9.0.0
Source Code Documentation
sp_variable Class Reference

This class represents a stored program variable or a parameter (also referenced as 'SP-variable'). More...

#include <sp_pcontext.h>

Public Types

enum  enum_mode { MODE_IN , MODE_OUT , MODE_INOUT }
 

Public Member Functions

 sp_variable (LEX_STRING _name, enum_field_types _type, enum_mode _mode, uint _offset)
 

Public Attributes

LEX_STRING name
 Name of the SP-variable. More...
 
enum enum_field_types type
 Field-type of the SP-variable. More...
 
enum_mode mode
 Mode of the SP-variable. More...
 
uint offset
 The index to the variable's value in the runtime frame. More...
 
Itemdefault_value
 Default value of the SP-variable (if any). More...
 
Create_field field_def
 Full type information (field meta-data) of the SP-variable. More...
 

Detailed Description

This class represents a stored program variable or a parameter (also referenced as 'SP-variable').

Member Enumeration Documentation

◆ enum_mode

Enumerator
MODE_IN 
MODE_OUT 
MODE_INOUT 

Constructor & Destructor Documentation

◆ sp_variable()

sp_variable::sp_variable ( LEX_STRING  _name,
enum_field_types  _type,
enum_mode  _mode,
uint  _offset 
)
inline

Member Data Documentation

◆ default_value

Item* sp_variable::default_value

Default value of the SP-variable (if any).

◆ field_def

Create_field sp_variable::field_def

Full type information (field meta-data) of the SP-variable.

◆ mode

enum_mode sp_variable::mode

Mode of the SP-variable.

◆ name

LEX_STRING sp_variable::name

Name of the SP-variable.

◆ offset

uint sp_variable::offset

The index to the variable's value in the runtime frame.

It is calculated during parsing and used when creating sp_instr_set instructions and Item_splocal items. I.e. values are set/referred by array indexing in runtime.

◆ type

enum enum_field_types sp_variable::type

Field-type of the SP-variable.


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