24#ifndef DD__FOREIGN_KEY_INCLUDED
25#define DD__FOREIGN_KEY_INCLUDED
36class Foreign_key_element;
37class Foreign_key_impl;
Definition: collection.h:44
Base class for dictionary objects which has single column integer primary key.
Definition: entity_object.h:48
virtual const String_type & name() const =0
Definition: foreign_key_element.h:45
Definition: foreign_key_impl.h:56
Definition: foreign_key.h:181
Foreign_key_parent()
Definition: foreign_key.h:183
const String_type & fk_name() const
Definition: foreign_key.h:202
Foreign_key::enum_rule delete_rule() const
Definition: foreign_key.h:212
const String_type & child_schema_name() const
Definition: foreign_key.h:190
Foreign_key::enum_rule m_delete_rule
Definition: foreign_key.h:223
void set_child_schema_name(const String_type &child_schema_name)
Definition: foreign_key.h:192
const String_type & child_table_name() const
Definition: foreign_key.h:196
void set_update_rule(Foreign_key::enum_rule update_rule)
Definition: foreign_key.h:208
Foreign_key::enum_rule m_update_rule
Definition: foreign_key.h:222
void set_child_table_name(const String_type &child_table_name)
Definition: foreign_key.h:198
String_type m_fk_name
Definition: foreign_key.h:221
Foreign_key::enum_rule update_rule() const
Definition: foreign_key.h:206
void set_fk_name(const String_type &fk_name)
Definition: foreign_key.h:204
void set_delete_rule(Foreign_key::enum_rule delete_rule)
Definition: foreign_key.h:214
String_type m_child_schema_name
Definition: foreign_key.h:219
String_type m_child_table_name
Definition: foreign_key.h:220
Definition: foreign_key.h:47
virtual void set_unique_constraint_name(const String_type &name)=0
~Foreign_key() override=default
virtual const String_type & referenced_table_schema_name() const =0
virtual void set_delete_rule(enum_rule delete_rule)=0
Collection< Foreign_key_element * > Foreign_key_elements
Definition: foreign_key.h:49
virtual void set_referenced_table_name(const String_type &name)=0
virtual const String_type & unique_constraint_name() const =0
virtual Foreign_key_element * add_element()=0
virtual void set_referenced_table_catalog_name(const String_type &name)=0
tables::Foreign_keys DD_table
Definition: foreign_key.h:51
enum_match_option
Definition: foreign_key.h:62
@ OPTION_PARTIAL
Definition: foreign_key.h:64
@ OPTION_NONE
Definition: foreign_key.h:63
@ OPTION_FULL
Definition: foreign_key.h:65
virtual void serialize(Sdi_wcontext *wctx, Sdi_writer *w) const =0
Converts *this into json.
virtual enum_match_option match_option() const =0
virtual Foreign_key_elements * elements()=0
virtual Table & table()=0
virtual void set_match_option(enum_match_option match_option)=0
virtual const Table & table() const =0
virtual void set_update_rule(enum_rule update_rule)=0
virtual void set_referenced_table_schema_name(const String_type &name)=0
virtual const Foreign_key_elements & elements() const =0
enum_rule
Definition: foreign_key.h:54
@ RULE_NO_ACTION
Definition: foreign_key.h:55
@ RULE_SET_DEFAULT
Definition: foreign_key.h:59
@ RULE_SET_NULL
Definition: foreign_key.h:58
@ RULE_RESTRICT
Definition: foreign_key.h:56
@ RULE_CASCADE
Definition: foreign_key.h:57
Foreign_key_impl Impl
Definition: foreign_key.h:50
virtual bool deserialize(Sdi_rcontext *rctx, const RJ_Value &val)=0
Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provide...
virtual enum_rule update_rule() const =0
virtual enum_rule delete_rule() const =0
virtual const String_type & referenced_table_catalog_name() const =0
virtual const String_type & referenced_table_name() const =0
Opaque context which keeps reusable resoureces needed during deserialization.
Definition: sdi.cc:231
Opaque context which keeps reusable resources needed during serialization.
Definition: sdi.cc:129
Definition: foreign_keys.h:38
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
RJ_Writer Sdi_writer
Alias for the rapidjson Writer type to use in serialization.
Definition: sdi_fwd.h:64
rapidjson::GenericValue< RJ_Encoding, RJ_Allocator > RJ_Value
Definition: sdi_fwd.h:49
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
This header provides Rapidjson Type Aliases.