MySQL  8.0.19
Source Code Documentation
dd::Foreign_key_element_impl Class Reference

#include <foreign_key_element_impl.h>

Inheritance diagram for dd::Foreign_key_element_impl:
dd::Weak_object_impl dd::Foreign_key_element dd::Weak_object dd::Weak_object

Public Member Functions

 Foreign_key_element_impl ()
 
 Foreign_key_element_impl (Foreign_key_impl *foreign_key)
 
 Foreign_key_element_impl (const Foreign_key_element_impl &src, Foreign_key_impl *parent, Column *column)
 
virtual ~Foreign_key_element_impl ()
 
virtual const Object_tableobject_table () const
 
virtual bool validate () const
 
virtual bool restore_attributes (const Raw_record &r)
 
virtual bool store_attributes (Raw_record *r)
 
void serialize (Sdi_wcontext *wctx, Sdi_writer *w) const
 Converts *this into json. More...
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val)
 Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provided. More...
 
void debug_print (String_type &outb) const
 
void set_ordinal_position (uint ordinal_position)
 
virtual const Foreign_keyforeign_key () const
 
virtual Foreign_keyforeign_key ()
 
virtual const Columncolumn () const
 
virtual void set_column (const Column *column)
 
virtual uint ordinal_position () const
 
virtual void set_ordinal_position (int ordinal_position)
 
virtual const String_typereferenced_column_name () const
 
virtual void referenced_column_name (const String_type &name)
 
virtual Object_keycreate_primary_key () const
 
virtual bool has_new_primary_key () const
 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_impl
 Weak_object_impl ()
 
virtual ~Weak_object_impl ()
 
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_children (Open_dictionary_tables_ctx *)
 
virtual bool store_children (Open_dictionary_tables_ctx *)
 
virtual bool drop_children (Open_dictionary_tables_ctx *) const
 
- Public Member Functions inherited from dd::Weak_object
 Weak_object ()
 
 Weak_object (const Weak_object &)=default
 
virtual ~Weak_object ()
 
- Public Member Functions inherited from dd::Foreign_key_element
virtual ~Foreign_key_element ()
 

Static Public Member Functions

static void register_tables (Open_dictionary_tables_ctx *otx)
 
static Foreign_key_element_implrestore_item (Foreign_key_impl *fk)
 
static Foreign_key_element_implclone (const Foreign_key_element_impl &other, Foreign_key_impl *fk)
 

Private Attributes

Foreign_key_implm_foreign_key
 
const Columnm_column
 
uint m_ordinal_position
 
String_type m_referenced_column_name
 

Additional Inherited Members

- Public Types inherited from dd::Foreign_key_element
typedef Foreign_key_element_impl Impl
 
typedef tables::Foreign_key_column_usage DD_table
 
- Protected Member Functions inherited from dd::Weak_object_impl
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

◆ Foreign_key_element_impl() [1/3]

dd::Foreign_key_element_impl::Foreign_key_element_impl ( )
inline

◆ Foreign_key_element_impl() [2/3]

dd::Foreign_key_element_impl::Foreign_key_element_impl ( Foreign_key_impl foreign_key)
inline

◆ Foreign_key_element_impl() [3/3]

dd::Foreign_key_element_impl::Foreign_key_element_impl ( const Foreign_key_element_impl src,
Foreign_key_impl parent,
Column column 
)

◆ ~Foreign_key_element_impl()

virtual dd::Foreign_key_element_impl::~Foreign_key_element_impl ( )
inlinevirtual

Member Function Documentation

◆ clone()

Foreign_key_element_impl * dd::Foreign_key_element_impl::clone ( const Foreign_key_element_impl other,
Foreign_key_impl fk 
)
static

◆ column()

virtual const Column& dd::Foreign_key_element_impl::column ( ) const
inlinevirtual

◆ create_primary_key()

Object_key * dd::Foreign_key_element_impl::create_primary_key ( ) const
virtual

Implements dd::Weak_object_impl.

◆ debug_print()

void dd::Foreign_key_element_impl::debug_print ( String_type outb) const
virtual

Implements dd::Weak_object.

◆ deserialize()

bool dd::Foreign_key_element_impl::deserialize ( Sdi_rcontext rctx,
const RJ_Value val 
)
virtual

Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provided.

Cross-references encountered within this object are tracked in sdictx, so that they can be updated when the entire object graph has been established.

Parameters
rctxstores book-keeping information for the deserialization process
valsubobject of rapidjson DOM containing json representation of this object
Returns
Return values
falsesuccess
truefailure

Implements dd::Foreign_key_element.

◆ foreign_key() [1/2]

virtual Foreign_key& dd::Foreign_key_element_impl::foreign_key ( )
virtual

◆ foreign_key() [2/2]

Foreign_key & dd::Foreign_key_element_impl::foreign_key ( ) const
virtual

◆ has_new_primary_key()

bool dd::Foreign_key_element_impl::has_new_primary_key ( ) const
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.

Implements dd::Weak_object_impl.

◆ object_table()

const Object_table & dd::Foreign_key_element_impl::object_table ( ) const
virtual

Implements dd::Weak_object_impl.

◆ ordinal_position()

virtual uint dd::Foreign_key_element_impl::ordinal_position ( ) const
inlinevirtual

◆ referenced_column_name() [1/2]

virtual const String_type& dd::Foreign_key_element_impl::referenced_column_name ( ) const
inlinevirtual

◆ referenced_column_name() [2/2]

virtual void dd::Foreign_key_element_impl::referenced_column_name ( const String_type name)
inlinevirtual

◆ register_tables()

void dd::Foreign_key_element_impl::register_tables ( Open_dictionary_tables_ctx otx)
static

◆ restore_attributes()

bool dd::Foreign_key_element_impl::restore_attributes ( const Raw_record r)
virtual

Implements dd::Weak_object_impl.

◆ restore_item()

static Foreign_key_element_impl* dd::Foreign_key_element_impl::restore_item ( Foreign_key_impl fk)
inlinestatic

◆ serialize()

void dd::Foreign_key_element_impl::serialize ( Sdi_wcontext wctx,
Sdi_writer w 
) const
virtual

Converts *this into json.

Converts all member variables that are to be included in the sdi into json by transforming them appropriately and passing them to the rapidjson writer provided.

Parameters
wctxopaque context for data needed by serialization
wrapidjson writer which will perform conversion to json

Implements dd::Foreign_key_element.

◆ set_column()

virtual void dd::Foreign_key_element_impl::set_column ( const Column column)
inlinevirtual

◆ set_ordinal_position() [1/2]

virtual void dd::Foreign_key_element_impl::set_ordinal_position ( int  ordinal_position)
inlinevirtual

◆ set_ordinal_position() [2/2]

void dd::Foreign_key_element_impl::set_ordinal_position ( uint  ordinal_position)
inline

◆ store_attributes()

bool dd::Foreign_key_element_impl::store_attributes ( Raw_record r)
virtual

Implements dd::Weak_object_impl.

◆ validate()

bool dd::Foreign_key_element_impl::validate ( ) const
virtual

Implements dd::Weak_object_impl.

Member Data Documentation

◆ m_column

const Column* dd::Foreign_key_element_impl::m_column
private

◆ m_foreign_key

Foreign_key_impl* dd::Foreign_key_element_impl::m_foreign_key
private

◆ m_ordinal_position

uint dd::Foreign_key_element_impl::m_ordinal_position
private

◆ m_referenced_column_name

String_type dd::Foreign_key_element_impl::m_referenced_column_name
private

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