MySQL 8.4.0
Source Code Documentation
dd::tables::Triggers Class Reference

#include <triggers.h>

Inheritance diagram for dd::tables::Triggers:
[legend]

Public Types

enum  enum_fields {
  FIELD_ID , FIELD_SCHEMA_ID , FIELD_NAME , FIELD_EVENT_TYPE ,
  FIELD_TABLE_ID , FIELD_ACTION_TIMING , FIELD_ACTION_ORDER , FIELD_ACTION_STATEMENT ,
  FIELD_ACTION_STATEMENT_UTF8 , FIELD_CREATED , FIELD_LAST_ALTERED , FIELD_SQL_MODE ,
  FIELD_DEFINER , FIELD_CLIENT_COLLATION_ID , FIELD_CONNECTION_COLLATION_ID , FIELD_SCHEMA_COLLATION_ID ,
  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_EVENT_TYPE_ACTION_TIMING_ACTION_ORDER , INDEX_K_CLIENT_COLLATION_ID ,
  INDEX_K_CONNECTION_COLLATION_ID , INDEX_K_SCHEMA_COLLATION_ID , INDEX_K_DEFINER
}
 
enum  enum_foreign_keys {
  FK_SCHEMA_ID , FK_TABLE_ID , FK_CLIENT_COLLATION_ID , FK_CONNECTION_COLLATION_ID ,
  FK_SCHEMA_COLLATION_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

 Triggers ()
 
- 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_typename () const override
 Get the table name used by the target definition for the dictionary table. More...
 
Object_table_definition_impltarget_table_definition () override
 Get the target definition for the dictionary table. More...
 
const Object_table_definition_impltarget_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_implactual_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 Triggersinstance ()
 
static const CHARSET_INFOname_collation ()
 
static Object_keycreate_key_by_schema_id (Object_id schema_id)
 Create a key to find all triggers for a given schema. More...
 
static Object_keycreate_key_by_table_id (Object_id table_id)
 Create a key to find all triggers for a given table. More...
 
static bool get_trigger_table_id (THD *thd, Object_id schema_id, const String_type &trigger_name, Object_id *oid)
 Find table's Object_id for a given trigger name. More...
 
static Object_keycreate_key_by_definer (const String_type &definer)
 Create a key to find all triggers for a given definer. More...
 
- Static Public Member Functions inherited from dd::Object_table
static Object_tablecreate_object_table ()
 Allocate a new Object_table instance on the heap. More...
 

Static Private Member Functions

static Object_keycreate_key_by_trigger_name (Object_id schema_id, const char *trigger_name)
 Create a key to find a trigger by schema_id and trigger name. More...
 
static Object_id read_table_id (const Raw_record &r)
 Get the table id from the record. 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
 

Member Enumeration Documentation

◆ enum_fields

Enumerator
FIELD_ID 
FIELD_SCHEMA_ID 
FIELD_NAME 
FIELD_EVENT_TYPE 
FIELD_TABLE_ID 
FIELD_ACTION_TIMING 
FIELD_ACTION_ORDER 
FIELD_ACTION_STATEMENT 
FIELD_ACTION_STATEMENT_UTF8 
FIELD_CREATED 
FIELD_LAST_ALTERED 
FIELD_SQL_MODE 
FIELD_DEFINER 
FIELD_CLIENT_COLLATION_ID 
FIELD_CONNECTION_COLLATION_ID 
FIELD_SCHEMA_COLLATION_ID 
FIELD_OPTIONS 
NUMBER_OF_FIELDS 

◆ enum_foreign_keys

Enumerator
FK_SCHEMA_ID 
FK_TABLE_ID 
FK_CLIENT_COLLATION_ID 
FK_CONNECTION_COLLATION_ID 
FK_SCHEMA_COLLATION_ID 

◆ enum_indexes

Enumerator
INDEX_PK_ID 
INDEX_UK_SCHEMA_ID_NAME 
INDEX_UK_TABLE_ID_EVENT_TYPE_ACTION_TIMING_ACTION_ORDER 
INDEX_K_CLIENT_COLLATION_ID 
INDEX_K_CONNECTION_COLLATION_ID 
INDEX_K_SCHEMA_COLLATION_ID 
INDEX_K_DEFINER 

Constructor & Destructor Documentation

◆ Triggers()

dd::tables::Triggers::Triggers ( )

Member Function Documentation

◆ create_key_by_definer()

Object_key * dd::tables::Triggers::create_key_by_definer ( const String_type definer)
static

Create a key to find all triggers for a given definer.

Parameters
definerName of the definer.
Returns
Pointer to Object_key.

◆ create_key_by_schema_id()

Object_key * dd::tables::Triggers::create_key_by_schema_id ( Object_id  schema_id)
static

Create a key to find all triggers for a given schema.

Parameters
schema_idObject_id of the schema.
Returns
Pointer to Object_key.

◆ create_key_by_table_id()

Object_key * dd::tables::Triggers::create_key_by_table_id ( Object_id  table_id)
static

Create a key to find all triggers for a given table.

Parameters
table_idObject_id of the table.
Returns
Pointer to Object_key.

◆ create_key_by_trigger_name()

Object_key * dd::tables::Triggers::create_key_by_trigger_name ( Object_id  schema_id,
const char *  trigger_name 
)
staticprivate

Create a key to find a trigger by schema_id and trigger name.

Parameters
schema_idObject_id of the table.
trigger_nameName of trigger.
Returns
Pointer to Object_key.

◆ get_trigger_table_id()

bool dd::tables::Triggers::get_trigger_table_id ( THD thd,
Object_id  schema_id,
const String_type trigger_name,
Object_id oid 
)
static

Find table's Object_id for a given trigger name.

Parameters
thdThread
schema_idObject_id of schema in which the trigger exists.
trigger_nameName of trigger we are search for.
oid[out] The Object_id of trigger.
Returns
false on success. true upon failure.

◆ instance()

static const Triggers & dd::tables::Triggers::instance ( )
inlinestatic

◆ name_collation()

const CHARSET_INFO * dd::tables::Triggers::name_collation ( )
static

◆ read_table_id()

Object_id dd::tables::Triggers::read_table_id ( const Raw_record r)
staticprivate

Get the table id from the record.

Parameters
rconst Reference to the Raw_record.
Returns
Object_id of the table.

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