MySQL 9.7.0
Source Code Documentation
Alter_column Class Reference

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

#include <sql_alter.h>

Public Types

enum class  Type {
  SET_DEFAULT , SET_MASKING_POLICY , DROP_DEFAULT , DROP_MASKING_POLICY ,
  RENAME_COLUMN , SET_COLUMN_VISIBLE , SET_COLUMN_INVISIBLE
}
 

Public Member Functions

LEX_CSTRING new_masking_policy_name () const
 The new masking policy name. More...
 
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 *col_name, LEX_CSTRING policy_name)
 Constructor for assigning or unassigning a column's MASKING POLICY. 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...
 
 Alter_column (const char *par_name, bool par_is_visible)
 Constructor used while altering column visibility. More...
 

Public Attributes

const char * name
 The column name being altered. More...
 
Itemdef {nullptr}
 The default value supplied. More...
 
Value_generatorm_default_val_expr {nullptr}
 The expression to be used to generate the default value. More...
 
const char * m_new_name {nullptr}
 The new column name. More...
 

Private Attributes

Type m_type
 
LEX_CSTRING m_new_masking_policy_name {NULL_CSTR}
 

Detailed Description

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

Member Enumeration Documentation

◆ Type

enum class Alter_column::Type
strong
Enumerator
SET_DEFAULT 
SET_MASKING_POLICY 
DROP_DEFAULT 
DROP_MASKING_POLICY 
RENAME_COLUMN 
SET_COLUMN_VISIBLE 
SET_COLUMN_INVISIBLE 

Constructor & Destructor Documentation

◆ Alter_column() [1/5]

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/5]

Alter_column::Alter_column ( const char *  col_name,
LEX_CSTRING  policy_name 
)
inline

Constructor for assigning or unassigning a column's MASKING POLICY.

◆ Alter_column() [3/5]

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() [4/5]

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

Constructor used while renaming field name.

◆ Alter_column() [5/5]

Alter_column::Alter_column ( const char *  par_name,
bool  par_is_visible 
)
inline

Constructor used while altering column visibility.

Member Function Documentation

◆ change_type()

Type Alter_column::change_type ( ) const
inline

Type of change requested in ALTER TABLE.

◆ new_masking_policy_name()

LEX_CSTRING Alter_column::new_masking_policy_name ( ) const
inline

The new masking policy name.

Member Data Documentation

◆ def

Item* Alter_column::def {nullptr}

The default value supplied.

◆ m_default_val_expr

Value_generator* Alter_column::m_default_val_expr {nullptr}

The expression to be used to generate the default value.

◆ m_new_masking_policy_name

LEX_CSTRING Alter_column::m_new_masking_policy_name {NULL_CSTR}
private

◆ m_new_name

const char* Alter_column::m_new_name {nullptr}

The new column 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: