MySQL 9.1.0
Source Code Documentation
|
#include <foreign_keys.h>
Public Types | |
enum | enum_fields { FIELD_ID , FIELD_SCHEMA_ID , FIELD_TABLE_ID , FIELD_NAME , FIELD_UNIQUE_CONSTRAINT_NAME , FIELD_MATCH_OPTION , FIELD_UPDATE_RULE , FIELD_DELETE_RULE , FIELD_REFERENCED_TABLE_CATALOG , FIELD_REFERENCED_TABLE_SCHEMA , FIELD_REFERENCED_TABLE , FIELD_OPTIONS , NUMBER_OF_FIELDS } |
enum | enum_indexes { INDEX_PK_ID = static_cast<uint>(Common_index::PK_ID) , INDEX_UK_SCHEMA_ID_NAME = static_cast<uint>(Common_index::UK_NAME) , INDEX_UK_TABLE_ID_NAME , INDEX_K_REF_CATALOG_REF_SCHEMA_REF_TABLE } |
enum | enum_foreign_keys { FK_SCHEMA_ID } |
Public Types inherited from dd::Object_table_impl | |
enum class | Common_option { ENGINE , CHARSET , COLLATION , ROW_FORMAT , STATS_PERSISTENT , TABLESPACE } |
enum class | Common_index { PK_ID , UK_NAME } |
enum class | Common_field { ID } |
Public Member Functions | |
Foreign_keys () | |
Public Member Functions inherited from dd::Object_table_impl | |
Object_table_impl (const String_type &schema_name, const String_type &table_name, const String_type &ddl_statement) | |
Object_table_impl () | |
const String_type & | name () const override |
Get the table name used by the target definition for the dictionary table. More... | |
Object_table_definition_impl * | target_table_definition () override |
Get the target definition for the dictionary table. More... | |
const Object_table_definition_impl * | target_table_definition () const override |
void | set_abandoned (uint last_dd_version) const override |
Mark the target definition for the dictionary table as abandoned. More... | |
bool | is_abandoned () const override |
Check if the dictionary table is abandoned. More... | |
const Object_table_definition_impl * | actual_table_definition () const override |
Get the actual definition for the dictionary table. More... | |
bool | set_actual_table_definition (const Properties &table_def_properties) const override |
Set the actual definition for the dictionary table. More... | |
virtual int | field_number (int target_field_number, const String_type &field_label) const |
int | field_number (const String_type &field_label) const override |
Get the field ordinal position in the object table. More... | |
bool | populate (THD *) const override |
Execute low level code for populating the table. More... | |
bool | is_hidden () const override |
Check if the table should be hidden. More... | |
void | set_hidden (bool hidden) override |
Mark the dictionary table as hidden or visible. More... | |
~Object_table_impl () override=default | |
Public Member Functions inherited from dd::Object_table | |
virtual | ~Object_table ()=default |
Static Public Member Functions | |
static const Foreign_keys & | instance () |
static const CHARSET_INFO * | name_collation () |
static Object_key * | create_key_by_foreign_key_name (Object_id schema_id, const String_type &foreign_key_name) |
static Object_key * | create_key_by_table_id (Object_id table_id) |
static Object_key * | create_key_by_referenced_name (const String_type &referenced_catalog, const String_type &referenced_schema, const String_type &referenced_table) |
static bool | check_foreign_key_exists (THD *thd, Object_id schema_id, const String_type &foreign_key_name, bool *exists) |
Check if schema contains foreign key with specified name. More... | |
Static Public Member Functions inherited from dd::Object_table | |
static Object_table * | create_object_table () |
Allocate a new Object_table instance on the heap. More... | |
Additional Inherited Members | |
Protected Attributes inherited from dd::Object_table_impl | |
uint | m_last_dd_version |
Object_table_definition_impl | m_target_def |
bool | m_actual_present |
Object_table_definition_impl | m_actual_def |
bool | m_hidden |
dd::tables::Foreign_keys::Foreign_keys | ( | ) |
|
static |
Check if schema contains foreign key with specified name.
thd | Thread context. | |
schema_id | Id of schema to be inspected. | |
foreign_key_name | Name of the foreign key. | |
[out] | exists | Set to true if foreign key with the name provided exists in the schema, false otherwise. |
false | No error. |
true | Error. |
|
static |
|
static |
|
static |
|
static |
|
static |