MySQL 8.0.40
Source Code Documentation
dd::Object_table_definition Class Referenceabstract

The purpose of this interface is to enable retrieving the SQL statements necessary to create and populate a DD table. More...

#include <object_table_definition.h>

Inheritance diagram for dd::Object_table_definition:
[legend]

Public Member Functions

virtual ~Object_table_definition ()=default
 
virtual void set_table_name (const String_type &name)=0
 Set the name of the table. More...
 
virtual void add_field (int field_number, const String_type &field_name, const String_type field_definition)=0
 Add a field to the object table definition. More...
 
virtual void add_index (int index_number, const String_type &index_name, const String_type &index_definition)=0
 Add an index to the object table definition. More...
 
virtual String_type get_ddl () const =0
 Get the SQL DDL statement for creating the dictionary table. More...
 
virtual const std::vector< String_type > & get_dml () const =0
 Get the SQL DML statements for populating the table. More...
 
virtual void store_into_properties (Properties *table_def_properties) const =0
 Store the elements of the object table definition into a property object. More...
 
virtual bool restore_from_properties (const Properties &table_def_properties)=0
 Restore the elements of the object table definition from a property object. More...
 

Detailed Description

The purpose of this interface is to enable retrieving the SQL statements necessary to create and populate a DD table.

An Object_table instance may use one or more instances implementing this interface to keep track of the table definitions corresponding to the supported DD versions.

Constructor & Destructor Documentation

◆ ~Object_table_definition()

virtual dd::Object_table_definition::~Object_table_definition ( )
virtualdefault

Member Function Documentation

◆ add_field()

virtual void dd::Object_table_definition::add_field ( int  field_number,
const String_type field_name,
const String_type  field_definition 
)
pure virtual

Add a field to the object table definition.

Parameters
field_numberPositional index of the field.
field_nameLabel which can be used to refer to the field.
field_definitionComplete field definition with name, type etc.

Implemented in dd::Object_table_definition_impl.

◆ add_index()

virtual void dd::Object_table_definition::add_index ( int  index_number,
const String_type index_name,
const String_type index_definition 
)
pure virtual

Add an index to the object table definition.

Parameters
index_numberPositional index (sic!) of the index.
index_nameLabel which can be used to refer to the index.
index_definitionComplete index definition.

Implemented in dd::Object_table_definition_impl.

◆ get_ddl()

virtual String_type dd::Object_table_definition::get_ddl ( ) const
pure virtual

Get the SQL DDL statement for creating the dictionary table.

Returns
String containing the SQL DDL statement for the target table.

Implemented in dd::Object_table_definition_impl.

◆ get_dml()

virtual const std::vector< String_type > & dd::Object_table_definition::get_dml ( ) const
pure virtual

Get the SQL DML statements for populating the table.

Returns
Vector of strings containing SQL DML statements

Implemented in dd::Object_table_definition_impl.

◆ restore_from_properties()

virtual bool dd::Object_table_definition::restore_from_properties ( const Properties table_def_properties)
pure virtual

Restore the elements of the object table definition from a property object.

Parameters
table_def_propertiesProperties object containing the definition.
Returns
Operation outcome, false if no error.

Implemented in dd::Object_table_definition_impl.

◆ set_table_name()

virtual void dd::Object_table_definition::set_table_name ( const String_type name)
pure virtual

Set the name of the table.

Parameters
nameTable name.

Implemented in dd::Object_table_definition_impl.

◆ store_into_properties()

virtual void dd::Object_table_definition::store_into_properties ( Properties table_def_properties) const
pure virtual

Store the elements of the object table definition into a property object.

Parameters
[out]table_def_propertiesProperties object containing the definition.

Implemented in dd::Object_table_definition_impl.


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