MySQL 8.4.2
Source Code Documentation
dd::Foreign_key_impl Class Reference

#include <foreign_key_impl.h>

Inheritance diagram for dd::Foreign_key_impl:
[legend]

Public Member Functions

 Foreign_key_impl ()
 
 Foreign_key_impl (Table_impl *table)
 
 Foreign_key_impl (const Foreign_key_impl &src, Table_impl *parent)
 
 ~Foreign_key_impl () override=default
 
const Object_tableobject_table () const override
 
bool validate () const override
 
bool store (Open_dictionary_tables_ctx *otx) override
 Store the DD object into DD table. More...
 
bool restore_children (Open_dictionary_tables_ctx *otx) override
 
bool store_children (Open_dictionary_tables_ctx *otx) override
 
bool drop_children (Open_dictionary_tables_ctx *otx) const override
 
bool restore_attributes (const Raw_record &r) override
 
bool store_attributes (Raw_record *r) override
 
void serialize (Sdi_wcontext *wctx, Sdi_writer *w) const override
 Converts *this into json. More...
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val) override
 Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provided. More...
 
void debug_print (String_type &outb) const override
 
void set_ordinal_position (uint)
 
virtual uint ordinal_position () const
 
const Tabletable () const override
 
Tabletable () override
 
const Table_impltable_impl () const
 
Table_impltable_impl ()
 
const String_typeunique_constraint_name () const override
 
void set_unique_constraint_name (const String_type &name) override
 
enum_match_option match_option () const override
 
void set_match_option (enum_match_option match_option) override
 
enum_rule update_rule () const override
 
void set_update_rule (enum_rule update_rule) override
 
enum_rule delete_rule () const override
 
void set_delete_rule (enum_rule delete_rule) override
 
const String_typereferenced_table_catalog_name () const override
 
void set_referenced_table_catalog_name (const String_type &name) override
 
const String_typereferenced_table_schema_name () const override
 
void set_referenced_table_schema_name (const String_type &name) override
 
const String_typereferenced_table_name () const override
 
void set_referenced_table_name (const String_type &name) override
 
Foreign_key_elementadd_element () override
 
const Foreign_key_elementselements () const override
 
Foreign_key_elementselements () override
 
Entity_object_implimpl () override
 
const Entity_object_implimpl () const override
 
Object_id id () const override
 The unique dictionary object id. More...
 
bool is_persistent () const override
 Is dictionary object persistent in dictionary tables ? More...
 
const String_typename () const override
 
void set_name (const String_type &name) override
 
Foreign_key_implclone (Table_impl *parent) const
 
- Public Member Functions inherited from dd::Entity_object_impl
 Entity_object_impl ()
 
void set_id (Object_id id)
 
Object_keycreate_primary_key () const override
 
bool has_new_primary_key () const override
 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
 Weak_object ()=default
 
 Weak_object (const Weak_object &)=default
 
virtual ~Weak_object ()=default
 
- Public Member Functions inherited from dd::Weak_object_impl_< use_pfs >
 Weak_object_impl_ ()=default
 
 ~Weak_object_impl_ () override=default
 
void * operator new (size_t size, const std::nothrow_t &nt) noexcept
 
void operator delete (void *ptr, const std::nothrow_t &nt) noexcept
 
void * operator new (size_t size) noexcept
 
void operator delete (void *ptr) noexcept
 
bool drop (Open_dictionary_tables_ctx *otx) const
 Drop the DD object from DD table. More...
 
- Public Member Functions inherited from dd::Foreign_key
 ~Foreign_key () override=default
 

Static Public Member Functions

static void register_tables (Open_dictionary_tables_ctx *otx)
 
static Foreign_key_implrestore_item (Table_impl *table)
 
static Foreign_key_implclone (const Foreign_key_impl &other, Table_impl *table)
 

Private Attributes

enum_match_option m_match_option
 
enum_rule m_update_rule
 
enum_rule m_delete_rule
 
String_type m_unique_constraint_name
 
String_type m_referenced_table_catalog_name
 
String_type m_referenced_table_schema_name
 
String_type m_referenced_table_name
 
Table_implm_table
 
Foreign_key_elements m_elements
 

Additional Inherited Members

- Public Types inherited from dd::Foreign_key
enum  enum_rule {
  RULE_NO_ACTION = 1 , RULE_RESTRICT , RULE_CASCADE , RULE_SET_NULL ,
  RULE_SET_DEFAULT
}
 
enum  enum_match_option { OPTION_NONE = 1 , OPTION_PARTIAL , OPTION_FULL }
 
typedef Collection< Foreign_key_element * > Foreign_key_elements
 
typedef Foreign_key_impl Impl
 
typedef tables::Foreign_keys DD_table
 
- Protected Member Functions inherited from dd::Entity_object_impl
void set_primary_key_value (const Raw_new_record &r) override
 
void fix_has_new_primary_key () override
 
void restore_id (const Raw_record &r, int field_idx)
 
void restore_name (const Raw_record &r, int field_idx)
 
bool store_id (Raw_record *r, int field_idx)
 
bool store_name (Raw_record *r, int field_idx)
 
bool store_name (Raw_record *r, int field_idx, bool is_null)
 
void serialize (Sdi_wcontext *wctx, Sdi_writer *w) const
 
bool deserialize (Sdi_rcontext *rctx, const RJ_Value &val)
 
 Entity_object_impl (const Entity_object_impl &src)
 
- Protected Member Functions inherited from dd::Weak_object_impl_< use_pfs >
bool check_parent_consistency (Entity_object_impl *parent, Object_id parent_id) const
 

Constructor & Destructor Documentation

◆ Foreign_key_impl() [1/3]

dd::Foreign_key_impl::Foreign_key_impl ( )

◆ Foreign_key_impl() [2/3]

dd::Foreign_key_impl::Foreign_key_impl ( Table_impl table)

◆ Foreign_key_impl() [3/3]

dd::Foreign_key_impl::Foreign_key_impl ( const Foreign_key_impl src,
Table_impl parent 
)

◆ ~Foreign_key_impl()

dd::Foreign_key_impl::~Foreign_key_impl ( )
overridedefault

Member Function Documentation

◆ add_element()

Foreign_key_element * dd::Foreign_key_impl::add_element ( )
overridevirtual

Implements dd::Foreign_key.

◆ clone() [1/2]

static Foreign_key_impl * dd::Foreign_key_impl::clone ( const Foreign_key_impl other,
Table_impl table 
)
inlinestatic

◆ clone() [2/2]

Foreign_key_impl * dd::Foreign_key_impl::clone ( Table_impl parent) const
inline

◆ debug_print()

void dd::Foreign_key_impl::debug_print ( String_type outb) const
overridevirtual

Implements dd::Weak_object.

◆ delete_rule()

enum_rule dd::Foreign_key_impl::delete_rule ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ deserialize()

bool dd::Foreign_key_impl::deserialize ( Sdi_rcontext rctx,
const RJ_Value val 
)
overridevirtual

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
Return values
falsesuccess
truefailure

Implements dd::Foreign_key.

◆ drop_children()

bool dd::Foreign_key_impl::drop_children ( Open_dictionary_tables_ctx otx) const
overridevirtual

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ elements() [1/2]

const Foreign_key_elements & dd::Foreign_key_impl::elements ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ elements() [2/2]

Foreign_key_elements * dd::Foreign_key_impl::elements ( )
inlineoverridevirtual

Implements dd::Foreign_key.

◆ id()

Object_id dd::Foreign_key_impl::id ( ) const
inlineoverridevirtual

The unique dictionary object id.

Reimplemented from dd::Entity_object_impl.

◆ impl() [1/2]

const Entity_object_impl * dd::Foreign_key_impl::impl ( ) const
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ impl() [2/2]

Entity_object_impl * dd::Foreign_key_impl::impl ( )
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ is_persistent()

bool dd::Foreign_key_impl::is_persistent ( ) const
inlineoverridevirtual

Is dictionary object persistent in dictionary tables ?

Reimplemented from dd::Entity_object_impl.

◆ match_option()

enum_match_option dd::Foreign_key_impl::match_option ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ name()

const String_type & dd::Foreign_key_impl::name ( ) const
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ object_table()

const Object_table & dd::Foreign_key_impl::object_table ( ) const
overridevirtual

◆ ordinal_position()

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

◆ referenced_table_catalog_name()

const String_type & dd::Foreign_key_impl::referenced_table_catalog_name ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ referenced_table_name()

const String_type & dd::Foreign_key_impl::referenced_table_name ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ referenced_table_schema_name()

const String_type & dd::Foreign_key_impl::referenced_table_schema_name ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ register_tables()

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

◆ restore_attributes()

bool dd::Foreign_key_impl::restore_attributes ( const Raw_record r)
overridevirtual

◆ restore_children()

bool dd::Foreign_key_impl::restore_children ( Open_dictionary_tables_ctx otx)
overridevirtual

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ restore_item()

static Foreign_key_impl * dd::Foreign_key_impl::restore_item ( Table_impl table)
inlinestatic

◆ serialize()

void dd::Foreign_key_impl::serialize ( Sdi_wcontext wctx,
Sdi_writer w 
) const
overridevirtual

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.

◆ set_delete_rule()

void dd::Foreign_key_impl::set_delete_rule ( enum_rule  delete_rule)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ set_match_option()

void dd::Foreign_key_impl::set_match_option ( enum_match_option  match_option)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ set_name()

void dd::Foreign_key_impl::set_name ( const String_type name)
inlineoverridevirtual

Reimplemented from dd::Entity_object_impl.

◆ set_ordinal_position()

void dd::Foreign_key_impl::set_ordinal_position ( uint  )
inline

◆ set_referenced_table_catalog_name()

void dd::Foreign_key_impl::set_referenced_table_catalog_name ( const String_type name)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ set_referenced_table_name()

void dd::Foreign_key_impl::set_referenced_table_name ( const String_type name)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ set_referenced_table_schema_name()

void dd::Foreign_key_impl::set_referenced_table_schema_name ( const String_type name)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ set_unique_constraint_name()

void dd::Foreign_key_impl::set_unique_constraint_name ( const String_type name)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ set_update_rule()

void dd::Foreign_key_impl::set_update_rule ( enum_rule  update_rule)
inlineoverridevirtual

Implements dd::Foreign_key.

◆ store()

bool dd::Foreign_key_impl::store ( Open_dictionary_tables_ctx otx)
overridevirtual

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 from dd::Weak_object_impl_< use_pfs >.

◆ store_attributes()

bool dd::Foreign_key_impl::store_attributes ( Raw_record r)
overridevirtual

◆ store_children()

bool dd::Foreign_key_impl::store_children ( Open_dictionary_tables_ctx otx)
overridevirtual

Reimplemented from dd::Weak_object_impl_< use_pfs >.

◆ table() [1/2]

const Table & dd::Foreign_key_impl::table ( ) const
overridevirtual

Implements dd::Foreign_key.

◆ table() [2/2]

Table & dd::Foreign_key_impl::table ( )
overridevirtual

Implements dd::Foreign_key.

◆ table_impl() [1/2]

Table_impl & dd::Foreign_key_impl::table_impl ( )
inline

◆ table_impl() [2/2]

const Table_impl & dd::Foreign_key_impl::table_impl ( ) const
inline

◆ unique_constraint_name()

const String_type & dd::Foreign_key_impl::unique_constraint_name ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ update_rule()

enum_rule dd::Foreign_key_impl::update_rule ( ) const
inlineoverridevirtual

Implements dd::Foreign_key.

◆ validate()

bool dd::Foreign_key_impl::validate ( ) const
overridevirtual

Member Data Documentation

◆ m_delete_rule

enum_rule dd::Foreign_key_impl::m_delete_rule
private

◆ m_elements

Foreign_key_elements dd::Foreign_key_impl::m_elements
private

◆ m_match_option

enum_match_option dd::Foreign_key_impl::m_match_option
private

◆ m_referenced_table_catalog_name

String_type dd::Foreign_key_impl::m_referenced_table_catalog_name
private

◆ m_referenced_table_name

String_type dd::Foreign_key_impl::m_referenced_table_name
private

◆ m_referenced_table_schema_name

String_type dd::Foreign_key_impl::m_referenced_table_schema_name
private

◆ m_table

Table_impl* dd::Foreign_key_impl::m_table
private

◆ m_unique_constraint_name

String_type dd::Foreign_key_impl::m_unique_constraint_name
private

◆ m_update_rule

enum_rule dd::Foreign_key_impl::m_update_rule
private

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