MySQL 8.4.0
Source Code Documentation
Check_constraint_column_dependency_checker Class Reference

Helper class to check if column being dropped or removed in ALTER statement is in use by Check constraints. More...

#include <sql_check_constraint.h>

Public Member Functions

 Check_constraint_column_dependency_checker (const Sql_check_constraint_spec_list &check_constraint_list)
 
bool operator() (const Alter_drop *drop)
 Method to check if column being dropped is in use by check constraints. More...
 
bool operator() (const Alter_column *alter_column)
 Method to check if column being renamed using RENAME COLUMN clause of the ALTER TABLE statement is in use by check constraints. More...
 
bool operator() (const Create_field &fld)
 Method to check if column being renamed using CHANGE [COLUMN] clause of the ALTER TABLE statement is in use by check constraints. More...
 

Private Member Functions

bool any_check_constraint_uses_column (const char *column_name)
 Check if any check constraint uses "column_name". More...
 

Private Attributes

const Sql_check_constraint_spec_listm_check_constraint_list
 Check constraint specification list. More...
 

Detailed Description

Helper class to check if column being dropped or removed in ALTER statement is in use by Check constraints.

Constructor & Destructor Documentation

◆ Check_constraint_column_dependency_checker()

Check_constraint_column_dependency_checker::Check_constraint_column_dependency_checker ( const Sql_check_constraint_spec_list check_constraint_list)
inlineexplicit

Member Function Documentation

◆ any_check_constraint_uses_column()

bool Check_constraint_column_dependency_checker::any_check_constraint_uses_column ( const char *  column_name)
private

Check if any check constraint uses "column_name".

Parameters
column_nameColumn name.
Return values
trueIf column is used by the check constraint.
falseOtherwise.

◆ operator()() [1/3]

bool Check_constraint_column_dependency_checker::operator() ( const Alter_column alter_column)

Method to check if column being renamed using RENAME COLUMN clause of the ALTER TABLE statement is in use by check constraints.

Parameters
alter_columnInstance of Alter_column.
Return values
trueIf some check constraint uses the column being renamed.
falseOtherwise.

◆ operator()() [2/3]

bool Check_constraint_column_dependency_checker::operator() ( const Alter_drop drop)

Method to check if column being dropped is in use by check constraints.

Parameters
dropInstance of Alter_drop.
Return values
trueIf some check constraint uses the column being dropped.
falseOtherwise.

◆ operator()() [3/3]

bool Check_constraint_column_dependency_checker::operator() ( const Create_field fld)

Method to check if column being renamed using CHANGE [COLUMN] clause of the ALTER TABLE statement is in use by check constraints.

Parameters
fldInstance of Create_field.
Return values
trueIf some check constraint uses the column being renamed.
falseOtherwise.

Member Data Documentation

◆ m_check_constraint_list

const Sql_check_constraint_spec_list& Check_constraint_column_dependency_checker::m_check_constraint_list
private

Check constraint specification list.


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