MySQL  8.0.19
Source Code Documentation
dd::Weak_object_impl Class Referenceabstract

#include <weak_object_impl.h>

Inheritance diagram for dd::Weak_object_impl:
dd::Weak_object dd::Column_type_element_impl dd::Entity_object_impl dd::Foreign_key_element_impl dd::Index_element_impl dd::Parameter_type_element_impl dd::Partition_index_impl dd::Partition_value_impl dd::Tablespace_file_impl dd::View_routine_impl dd::View_table_impl

Public Member Functions

 Weak_object_impl ()
 
virtual ~Weak_object_impl ()
 
virtual const Object_tableobject_table () const =0
 
virtual bool validate () const =0
 
virtual bool store (Open_dictionary_tables_ctx *otx)
 Store the DD object into DD table. More...
 
bool drop (Open_dictionary_tables_ctx *otx) const
 Drop the DD object from DD table. More...
 
virtual bool restore_attributes (const Raw_record &r)=0
 
virtual bool store_attributes (Raw_record *r)=0
 
virtual bool restore_children (Open_dictionary_tables_ctx *)
 
virtual bool store_children (Open_dictionary_tables_ctx *)
 
virtual bool drop_children (Open_dictionary_tables_ctx *) const
 
virtual bool has_new_primary_key () const =0
 Indicates that object is guaranteed to have primary key value which doesn't exist in database (e.g. More...
 
- Public Member Functions inherited from dd::Weak_object
virtual void debug_print (String_type &outb) const =0
 
 Weak_object ()
 
 Weak_object (const Weak_object &)=default
 
virtual ~Weak_object ()
 

Protected Member Functions

virtual Object_keycreate_primary_key () const =0
 
virtual void set_primary_key_value (const Raw_new_record &)
 
virtual void fix_has_new_primary_key ()
 
bool check_parent_consistency (Entity_object_impl *parent, Object_id parent_id) const
 

Constructor & Destructor Documentation

◆ Weak_object_impl()

dd::Weak_object_impl::Weak_object_impl ( )
inline

◆ ~Weak_object_impl()

virtual dd::Weak_object_impl::~Weak_object_impl ( )
inlinevirtual

Member Function Documentation

◆ check_parent_consistency()

bool dd::Weak_object_impl::check_parent_consistency ( Entity_object_impl parent,
Object_id  parent_id 
) const
protected

◆ create_primary_key()

◆ drop()

bool dd::Weak_object_impl::drop ( Open_dictionary_tables_ctx otx) const

Drop the DD object from DD table.

Parameters
otx- DD transaction in use.
Returns
true - on failure and error is reported.
false - on success.

Drop collections and then drop the object

We should drop collections first and then parent object as we have referencial constraints. Mostly the reverse order of restore/store operation.

◆ drop_children()

◆ fix_has_new_primary_key()

virtual void dd::Weak_object_impl::fix_has_new_primary_key ( )
inlineprotectedvirtual

Reimplemented in dd::Entity_object_impl.

◆ has_new_primary_key()

virtual bool dd::Weak_object_impl::has_new_primary_key ( ) const
pure virtual

Indicates that object is guaranteed to have primary key value which doesn't exist in database (e.g.

because it only will be generated using auto-increment at store() time). So it is ok for store() method to skip lookup of existing object with the same primary key and simply try to insert new object into the table.

Implemented in dd::Entity_object_impl, dd::Table_stat_impl, dd::Partition_index_impl, dd::Index_element_impl, dd::Partition_value_impl, dd::Tablespace_file_impl, dd::Foreign_key_element_impl, dd::Index_stat_impl, dd::View_routine_impl, dd::View_table_impl, dd::Column_type_element_impl, and dd::Parameter_type_element_impl.

◆ object_table()

◆ restore_attributes()

◆ restore_children()

◆ set_primary_key_value()

virtual void dd::Weak_object_impl::set_primary_key_value ( const Raw_new_record )
inlineprotectedvirtual

Reimplemented in dd::Entity_object_impl.

◆ store()

bool dd::Weak_object_impl::store ( Open_dictionary_tables_ctx otx)
virtual

Store the DD object into DD table.

Parameters
otx- DD transaction in use.
Returns
true - on failure and error is reported.
false - on success.

Reimplemented in dd::Check_constraint_impl, dd::Foreign_key_impl, and dd::Tablespace_file_impl.

◆ store_attributes()

◆ store_children()

◆ validate()


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