MySQL 8.0.39
Source Code Documentation
PT_check_constraint_column_attr Class Reference

Node for the [CONSTRAINT [symbol]] CHECK '(' expr ')' column attribute. More...

#include <parse_tree_column_attrs.h>

Inheritance diagram for PT_check_constraint_column_attr:
[legend]

Public Member Functions

 PT_check_constraint_column_attr (LEX_STRING &name, Item *expr)
 
bool set_constraint_enforcement (bool enforced) override
 Update the ENFORCED/NOT ENFORCED state of the CHECK constraint. More...
 
void apply_alter_info_flags (ulonglong *flags) const override
 
bool add_check_constraints (Sql_check_constraint_spec_list *check_const_list) override
 
bool contextualize (Column_parse_context *pc) override
 Do all context-sensitive things and mark the node as contextualized. More...
 
- Public Member Functions inherited from PT_column_attr_base
virtual void apply_type_flags (ulong *) const
 
virtual void apply_comment (LEX_CSTRING *) const
 
virtual void apply_default_value (Item **) const
 
virtual void apply_gen_default_value (Value_generator **)
 
virtual void apply_on_update_value (Item **) const
 
virtual void apply_srid_modifier (std::optional< gis::srid_t > *) const
 
virtual bool apply_collation (Column_parse_context *, const CHARSET_INFO **to, bool *has_explicit_collation) const
 
virtual bool has_constraint_enforcement () const
 Check for the [NOT] ENFORCED characteristic. More...
 
virtual bool is_constraint_enforced () const
 Check if constraint is enforced. More...
 
- Public Member Functions inherited from Parse_tree_node_tmpl< Column_parse_context >
virtual ~Parse_tree_node_tmpl ()=default
 
bool is_contextualized () const
 
void error (Column_parse_context *pc, const POS &pos) const
 syntax_error() function replacement for deferred reporting of syntax errors More...
 
void error (Column_parse_context *pc, const POS &pos, const char *msg) const
 syntax_error() function replacement for deferred reporting of syntax errors More...
 
void errorf (Column_parse_context *pc, const POS &pos, const char *format,...) const
 syntax_error() function replacement for deferred reporting of syntax errors More...
 

Private Types

typedef PT_column_attr_base super
 

Private Attributes

Sql_check_constraint_spec col_cc_spec
 

Additional Inherited Members

- Public Types inherited from PT_column_attr_base
typedef decltype(Alter_info::flagsalter_info_flags_t
 
- Public Types inherited from Parse_tree_node_tmpl< Column_parse_context >
typedef Column_parse_context context_t
 
- Static Public Member Functions inherited from Parse_tree_node_tmpl< Column_parse_context >
static void * operator new (size_t size, MEM_ROOT *mem_root, const std::nothrow_t &arg=std::nothrow) noexcept
 
static void operator delete (void *ptr, size_t size)
 
static void operator delete (void *, MEM_ROOT *, const std::nothrow_t &) noexcept
 
- Protected Member Functions inherited from PT_column_attr_base
 PT_column_attr_base ()=default
 
- Protected Member Functions inherited from Parse_tree_node_tmpl< Column_parse_context >
 Parse_tree_node_tmpl ()
 

Detailed Description

Node for the [CONSTRAINT [symbol]] CHECK '(' expr ')' column attribute.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ PT_check_constraint_column_attr()

PT_check_constraint_column_attr::PT_check_constraint_column_attr ( LEX_STRING name,
Item expr 
)
inlineexplicit

Member Function Documentation

◆ add_check_constraints()

bool PT_check_constraint_column_attr::add_check_constraints ( Sql_check_constraint_spec_list check_const_list)
inlineoverridevirtual

Reimplemented from PT_column_attr_base.

◆ apply_alter_info_flags()

void PT_check_constraint_column_attr::apply_alter_info_flags ( ulonglong flags) const
inlineoverridevirtual

Reimplemented from PT_column_attr_base.

◆ contextualize()

bool PT_check_constraint_column_attr::contextualize ( Column_parse_context pc)
inlineoverridevirtual

Do all context-sensitive things and mark the node as contextualized.

Parameters
pccurrent parse context
Return values
falsesuccess
truesyntax/OOM/etc error

Reimplemented from Parse_tree_node_tmpl< Column_parse_context >.

◆ set_constraint_enforcement()

bool PT_check_constraint_column_attr::set_constraint_enforcement ( bool  enforced)
inlineoverridevirtual

Update the ENFORCED/NOT ENFORCED state of the CHECK constraint.

Parameters
enforcedtrue if ENFORCED, false if NOT ENFORCED.
Returns
false if success, true if error (e.g. if [NOT] ENFORCED follows something other than the CHECK clause.)

Reimplemented from PT_column_attr_base.

Member Data Documentation

◆ col_cc_spec

Sql_check_constraint_spec PT_check_constraint_column_attr::col_cc_spec
private

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