#include <object_table_definition_impl.h>
|  | 
|  | Object_table_definition_impl ()=default | 
|  | 
|  | Object_table_definition_impl (const String_type &schema_name, const String_type &table_name, const String_type &ddl_statement) | 
|  | 
|  | ~Object_table_definition_impl () override=default | 
|  | 
| const String_type & | get_table_name () const | 
|  | 
| void | set_table_name (const String_type &name) override | 
|  | Set the name of the table.  More... 
 | 
|  | 
| void | set_schema_name (const String_type &name) | 
|  | 
| void | add_field (int field_number, const String_type &field_name, const String_type field_definition) override | 
|  | Add a field to the object table definition.  More... 
 | 
|  | 
| void | add_sql_mode_field (int field_number, const String_type &field_name) | 
|  | 
| void | add_index (int index_number, const String_type &index_name, const String_type &index_definition) override | 
|  | Add an index to the object table definition.  More... 
 | 
|  | 
| virtual void | add_foreign_key (int foreign_key_number, const String_type &foreign_key_name, const String_type &foreign_key_definition) | 
|  | 
| virtual void | add_option (int option_number, const String_type &option_name, const String_type &option_definition) | 
|  | 
| virtual void | add_populate_statement (const String_type &statement) | 
|  | 
| virtual int | field_number (const String_type &field_name) const | 
|  | 
| virtual int | index_number (const String_type &index_name) const | 
|  | 
| virtual int | option_number (const String_type &option_name) const | 
|  | 
| String_type | get_ddl () const override | 
|  | Get the SQL DDL statement for creating the dictionary table.  More... 
 | 
|  | 
| const std::vector< String_type > & | get_dml () const override | 
|  | Get the SQL DML statements for populating the table.  More... 
 | 
|  | 
| void | store_into_properties (Properties *table_def_properties) const override | 
|  | Store the elements of the object table definition into a property object.  More... 
 | 
|  | 
| virtual bool | restore_from_string (const String_type &ddl_statement) | 
|  | 
| bool | restore_from_properties (const Properties &table_def_properties) override | 
|  | Restore the elements of the object table definition from a property object.  More... 
 | 
|  | 
| virtual | ~Object_table_definition ()=default | 
|  | 
◆ Element_definitions
◆ Element_numbers
◆ Label
| Enumerator | 
|---|
| NAME |  | 
| FIELDS |  | 
| INDEXES |  | 
| FOREIGN_KEYS |  | 
| OPTIONS |  | 
| LABEL |  | 
| POSITION |  | 
| DEFINITION |  | 
| ELEMENT |  | 
 
 
◆ Object_table_definition_impl() [1/2]
  
  | 
        
          | dd::Object_table_definition_impl::Object_table_definition_impl | ( |  | ) |  |  | default | 
 
 
◆ Object_table_definition_impl() [2/2]
  
  | 
        
          | dd::Object_table_definition_impl::Object_table_definition_impl | ( | const String_type & | schema_name, |  
          |  |  | const String_type & | table_name, |  
          |  |  | const String_type & | ddl_statement |  
          |  | ) |  |  |  | inline | 
 
 
◆ ~Object_table_definition_impl()
  
  | 
        
          | dd::Object_table_definition_impl::~Object_table_definition_impl | ( |  | ) |  |  | overridedefault | 
 
 
◆ add_element()
◆ add_field()
  
  | 
        
          | void dd::Object_table_definition_impl::add_field | ( | int | field_number, |  
          |  |  | const String_type & | field_name, |  
          |  |  | const String_type | field_definition |  
          |  | ) |  |  |  | inlineoverridevirtual | 
 
Add a field to the object table definition. 
- Parameters
- 
  
    | field_number | Positional index of the field. |  | field_name | Label which can be used to refer to the field. |  | field_definition | Complete field definition with name, type etc. |  
 
Implements dd::Object_table_definition.
 
 
◆ add_foreign_key()
  
  | 
        
          | virtual void dd::Object_table_definition_impl::add_foreign_key | ( | int | foreign_key_number, |  
          |  |  | const String_type & | foreign_key_name, |  
          |  |  | const String_type & | foreign_key_definition |  
          |  | ) |  |  |  | inlinevirtual | 
 
 
◆ add_index()
  
  | 
        
          | void dd::Object_table_definition_impl::add_index | ( | int | index_number, |  
          |  |  | const String_type & | index_name, |  
          |  |  | const String_type & | index_definition |  
          |  | ) |  |  |  | inlineoverridevirtual | 
 
Add an index to the object table definition. 
- Parameters
- 
  
    | index_number | Positional index (sic!) of the index. |  | index_name | Label which can be used to refer to the index. |  | index_definition | Complete index definition. |  
 
Implements dd::Object_table_definition.
 
 
◆ add_option()
  
  | 
        
          | virtual void dd::Object_table_definition_impl::add_option | ( | int | option_number, |  
          |  |  | const String_type & | option_name, |  
          |  |  | const String_type & | option_definition |  
          |  | ) |  |  |  | inlinevirtual | 
 
 
◆ add_populate_statement()
  
  | 
        
          | virtual void dd::Object_table_definition_impl::add_populate_statement | ( | const String_type & | statement | ) |  |  | inlinevirtual | 
 
 
◆ add_sql_mode_field()
      
        
          | void dd::Object_table_definition_impl::add_sql_mode_field | ( | int | field_number, | 
        
          |  |  | const String_type & | field_name | 
        
          |  | ) |  |  | 
      
 
 
◆ element_number()
  
  | 
        
          | int dd::Object_table_definition_impl::element_number | ( | const String_type & | element_name, |  
          |  |  | const Element_numbers & | element_numbers |  
          |  | ) |  | const |  | inlineprivate | 
 
 
◆ field_number()
  
  | 
        
          | virtual int dd::Object_table_definition_impl::field_number | ( | const String_type & | field_name | ) | const |  | inlinevirtual | 
 
 
◆ fs_name_case()
  
  | 
        
          | static const char * dd::Object_table_definition_impl::fs_name_case | ( | const String_type & | src, |  
          |  |  | char * | buf |  
          |  | ) |  |  |  | inlinestatic | 
 
Convert to lowercase if lower_case_table_names == 2. 
This is needed e.g when reconstructing name keys from a dictionary object in order to remove the object.
- Parameters
- 
  
    |  | src | String to possibly convert to lowercase. |  | [in,out] | buf | Buffer for storing lowercase'd string. Supplied by the caller. |  
 
- Returns
- A pointer to the src string if l_c_t_n != 2 
- 
A pointer to the buf supplied by the caller, into which the src string has been copied and lowercase'd, if l_c_t_n == 2 
 
 
◆ fs_name_collation()
  
  | 
        
          | static const CHARSET_INFO * dd::Object_table_definition_impl::fs_name_collation | ( |  | ) |  |  | inlinestatic | 
 
Get the collation which is used for names related to the file system (e.g. 
a schema name or table name). This collation is case sensitive or not, depending on the setting of lower_case- table_names.
- Returns
- Pointer to CHARSET_INFO. 
 
 
◆ get_ddl()
  
  | 
        
          | String_type dd::Object_table_definition_impl::get_ddl | ( |  | ) | const |  | overridevirtual | 
 
Get the SQL DDL statement for creating the dictionary table. 
- Returns
- String containing the SQL DDL statement for the target table. 
Implements dd::Object_table_definition.
 
 
◆ get_dml()
  
  | 
        
          | const std::vector< String_type > & dd::Object_table_definition_impl::get_dml | ( |  | ) | const |  | inlineoverridevirtual | 
 
Get the SQL DML statements for populating the table. 
- Returns
- Vector of strings containing SQL DML statements 
Implements dd::Object_table_definition.
 
 
◆ get_element_properties()
◆ get_table_name()
  
  | 
        
          | const String_type & dd::Object_table_definition_impl::get_table_name | ( |  | ) | const |  | inline | 
 
 
◆ index_number()
  
  | 
        
          | virtual int dd::Object_table_definition_impl::index_number | ( | const String_type & | index_name | ) | const |  | inlinevirtual | 
 
 
◆ is_dd_tablespace_encrypted()
  
  | 
        
          | static bool dd::Object_table_definition_impl::is_dd_tablespace_encrypted | ( |  | ) |  |  | inlinestatic | 
 
 
◆ key()
  
  | 
        
          | static const char * dd::Object_table_definition_impl::key | ( | Label | label | ) |  |  | inlinestaticprivate | 
 
 
◆ name_collation()
  
  | 
        
          | static const CHARSET_INFO * dd::Object_table_definition_impl::name_collation | ( |  | ) |  |  | inlinestatic | 
 
Get the collation which is used for the name field in the table. 
Table collation UTF8_BIN is used when collation for the name field is not specified. Tables using different collation must override this method.
TODO: Changing table collation is not supporting during upgrade as of now. To support this, static definition of this method should be avoided and should provide a possibility to have different collations for actual and target table definition.
- Returns
- Pointer to CHARSET_INFO. 
 
 
◆ option_number()
  
  | 
        
          | virtual int dd::Object_table_definition_impl::option_number | ( | const String_type & | option_name | ) | const |  | inlinevirtual | 
 
 
◆ restore_from_properties()
  
  | 
        
          | bool dd::Object_table_definition_impl::restore_from_properties | ( | const Properties & | table_def_properties | ) |  |  | overridevirtual | 
 
Restore the elements of the object table definition from a property object. 
- Parameters
- 
  
    | table_def_properties | Properties object containing the definition. |  
 
- Returns
- Operation outcome, false if no error. 
Implements dd::Object_table_definition.
 
 
◆ restore_from_string()
  
  | 
        
          | virtual bool dd::Object_table_definition_impl::restore_from_string | ( | const String_type & | ddl_statement | ) |  |  | inlinevirtual | 
 
 
◆ set_dd_tablespace_encrypted()
  
  | 
        
          | static void dd::Object_table_definition_impl::set_dd_tablespace_encrypted | ( | bool | is_encrypted | ) |  |  | inlinestatic | 
 
 
◆ set_element_properties()
◆ set_schema_name()
  
  | 
        
          | void dd::Object_table_definition_impl::set_schema_name | ( | const String_type & | name | ) |  |  | inline | 
 
 
◆ set_table_name()
  
  | 
        
          | void dd::Object_table_definition_impl::set_table_name | ( | const String_type & | name | ) |  |  | inlineoverridevirtual | 
 
 
◆ store_into_properties()
  
  | 
        
          | void dd::Object_table_definition_impl::store_into_properties | ( | Properties * | table_def_properties | ) | const |  | overridevirtual | 
 
Store the elements of the object table definition into a property object. 
- Parameters
- 
  
    | [out] | table_def_properties | Properties object containing the definition. |  
 
Implements dd::Object_table_definition.
 
 
◆ m_ddl_statement
  
  | 
        
          | String_type dd::Object_table_definition_impl::m_ddl_statement |  | private | 
 
 
◆ m_dml_statements
  
  | 
        
          | std::vector<String_type> dd::Object_table_definition_impl::m_dml_statements |  | private | 
 
 
◆ m_field_definitions
◆ m_field_numbers
◆ m_foreign_key_definitions
◆ m_foreign_key_numbers
◆ m_index_definitions
◆ m_index_numbers
◆ m_option_definitions
◆ m_option_numbers
◆ m_schema_name
  
  | 
        
          | String_type dd::Object_table_definition_impl::m_schema_name |  | private | 
 
 
◆ m_table_name
  
  | 
        
          | String_type dd::Object_table_definition_impl::m_table_name |  | private | 
 
 
◆ s_dd_tablespace_encrypted
  
  | 
        
          | bool dd::Object_table_definition_impl::s_dd_tablespace_encrypted = false |  | staticprivate | 
 
 
The documentation for this class was generated from the following files: