MySQL  8.0.17
Source Code Documentation
PT_column_attr_base Class Reference

Base class for all column attributes in CREATE/ALTER TABLE More...

#include <parse_tree_column_attrs.h>

Inheritance diagram for PT_column_attr_base:
Parse_tree_node_tmpl< Column_parse_context > PT_auto_increment_column_attr PT_check_constraint_column_attr PT_collate_column_attr PT_column_format_column_attr PT_comment_column_attr PT_constraint_enforcement_attr PT_default_column_attr PT_generated_default_val_column_attr PT_not_null_column_attr PT_null_column_attr PT_on_update_column_attr PT_primary_key_column_attr PT_secondary_column_attr PT_serial_default_value_column_attr PT_srid_column_attr PT_storage_media_column_attr PT_unique_key_column_attr

Public Member Functions

virtual void apply_type_flags (ulong *) const
 
virtual void apply_alter_info_flags (ulonglong *) 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 (Nullable< gis::srid_t > *) const
 
virtual bool apply_collation (Column_parse_context *, const CHARSET_INFO **to, bool *has_explicit_collation) const
 
virtual bool add_check_constraints (Sql_check_constraint_spec_list *check_const_list)
 
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...
 
virtual bool set_constraint_enforcement (bool enforced)
 Update the ENFORCED/NOT ENFORCED state of the CHECK constraint. More...
 
- Public Member Functions inherited from Parse_tree_node_tmpl< Column_parse_context >
virtual ~Parse_tree_node_tmpl ()
 
bool is_contextualized () const
 
virtual bool contextualize (Column_parse_context *pc)
 Do all context-sensitive things and mark the node as contextualized. More...
 
virtual bool contextualize_ (Column_parse_context *)
 
Intermediate version of the contextualize() function More...
 
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...
 

Public Attributes

decltype(Alter_info::flags) typedef alter_info_flags_t
 

Protected Member Functions

 PT_column_attr_base ()
 
- Protected Member Functions inherited from Parse_tree_node_tmpl< Column_parse_context >
 Parse_tree_node_tmpl ()
 

Additional Inherited Members

- 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
 

Detailed Description

Base class for all column attributes in CREATE/ALTER TABLE

Constructor & Destructor Documentation

◆ PT_column_attr_base()

PT_column_attr_base::PT_column_attr_base ( )
inlineprotected

Member Function Documentation

◆ add_check_constraints()

virtual bool PT_column_attr_base::add_check_constraints ( Sql_check_constraint_spec_list check_const_list)
inlinevirtual

◆ apply_alter_info_flags()

virtual void PT_column_attr_base::apply_alter_info_flags ( ulonglong ) const
inlinevirtual

◆ apply_collation()

virtual bool PT_column_attr_base::apply_collation ( Column_parse_context ,
const CHARSET_INFO **  to,
bool has_explicit_collation 
) const
inlinevirtual

Reimplemented in PT_collate_column_attr.

◆ apply_comment()

virtual void PT_column_attr_base::apply_comment ( LEX_CSTRING ) const
inlinevirtual

Reimplemented in PT_comment_column_attr.

◆ apply_default_value()

virtual void PT_column_attr_base::apply_default_value ( Item **  ) const
inlinevirtual

Reimplemented in PT_default_column_attr.

◆ apply_gen_default_value()

virtual void PT_column_attr_base::apply_gen_default_value ( Value_generator **  )
inlinevirtual

◆ apply_on_update_value()

virtual void PT_column_attr_base::apply_on_update_value ( Item **  ) const
inlinevirtual

Reimplemented in PT_on_update_column_attr.

◆ apply_srid_modifier()

virtual void PT_column_attr_base::apply_srid_modifier ( Nullable< gis::srid_t > *  ) const
inlinevirtual

Reimplemented in PT_srid_column_attr.

◆ apply_type_flags()

◆ has_constraint_enforcement()

virtual bool PT_column_attr_base::has_constraint_enforcement ( ) const
inlinevirtual

Check for the [NOT] ENFORCED characteristic.

Returns
true if the [NOT] ENFORCED follows the CHECK(...) clause, false otherwise.

Reimplemented in PT_constraint_enforcement_attr.

◆ is_constraint_enforced()

virtual bool PT_column_attr_base::is_constraint_enforced ( ) const
inlinevirtual

Check if constraint is enforced.

Method must be called only when has_constraint_enforcement() is true (i.e when [NOT] ENFORCED follows the CHECK(...) clause).

Returns
true if constraint is enforced. false otherwise.

Reimplemented in PT_constraint_enforcement_attr.

◆ set_constraint_enforcement()

virtual bool PT_column_attr_base::set_constraint_enforcement ( bool  enforced)
inlinevirtual

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 in PT_check_constraint_column_attr.

Member Data Documentation

◆ alter_info_flags_t

decltype(Alter_info::flags) typedef PT_column_attr_base::alter_info_flags_t

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