MySQL  8.0.17
Source Code Documentation
Alter_column Class Reference

Class representing SET DEFAULT, DROP DEFAULT and RENAME COLUMN clause in ALTER TABLE statement. More...

#include <sql_alter.h>

Public Types

enum  Type { Type::SET_DEFAULT, Type::DROP_DEFAULT, Type::RENAME_COLUMN }
 

Public Member Functions

Type change_type () const
 Type of change requested in ALTER TABLE. More...
 
 Alter_column (const char *par_name, Item *literal)
 Constructor used when altering the field's default value with a literal constant or when dropping a field's default value. More...
 
 Alter_column (const char *par_name, Value_generator *gen_def)
 Constructor used when setting a field's DEFAULT value to an expression. More...
 
 Alter_column (const char *old_name, const char *new_name)
 Constructor used while renaming field name. More...
 

Public Attributes

const char * name
 The column name being altered. More...
 
Itemdef
 The default value supplied. More...
 
Value_generatorm_default_val_expr
 The expression to be used to generated the default value. More...
 
const char * m_new_name
 The new colum name. More...
 

Private Attributes

Type m_type
 

Detailed Description

Class representing SET DEFAULT, DROP DEFAULT and RENAME COLUMN clause in ALTER TABLE statement.

Member Enumeration Documentation

◆ Type

enum Alter_column::Type
strong
Enumerator
SET_DEFAULT 
DROP_DEFAULT 
RENAME_COLUMN 

Constructor & Destructor Documentation

◆ Alter_column() [1/3]

Alter_column::Alter_column ( const char *  par_name,
Item literal 
)
inline

Constructor used when altering the field's default value with a literal constant or when dropping a field's default value.

◆ Alter_column() [2/3]

Alter_column::Alter_column ( const char *  par_name,
Value_generator gen_def 
)
inline

Constructor used when setting a field's DEFAULT value to an expression.

◆ Alter_column() [3/3]

Alter_column::Alter_column ( const char *  old_name,
const char *  new_name 
)
inline

Constructor used while renaming field name.

Member Function Documentation

◆ change_type()

Type Alter_column::change_type ( ) const
inline

Type of change requested in ALTER TABLE.

Member Data Documentation

◆ def

Item* Alter_column::def

The default value supplied.

◆ m_default_val_expr

Value_generator* Alter_column::m_default_val_expr

The expression to be used to generated the default value.

◆ m_new_name

const char* Alter_column::m_new_name

The new colum name.

◆ m_type

Type Alter_column::m_type
private

◆ name

const char* Alter_column::name

The column name being altered.


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