D.S

dev.mysql.com

MySQL: sql/dd/types/object_table_definition.h Source File

MySQL: sql/dd/types/object_table_definition.h Source File MySQL  8.0.0 Source Code Documentation Main Page Related Pages Modules Namespaces Classes Files File List File Members object_table_definition.h Go to the documentation of this file. 1 /* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. 2  3  This program is free software; you can redistribute it and/or modify 4  it under the terms of the GNU General Public License as published by 5  the Free Software Foundation; version 2 of the License. 6  7  This program is distributed in the hope that it will be useful, 8  but WITHOUT ANY WARRANTY; without even the implied warranty of 9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10  GNU General Public License for more details. 11  12  You should have received a copy of the GNU General Public License 13  along with this program; if not, write to the Free Software Foundation, 14  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15  16 #ifndef DD__OBJECT_TABLE_DEFINITION_INCLUDED 17 #define DD__OBJECT_TABLE_DEFINITION_INCLUDED 18  19 #include " my_global.h " 20  21 #include <vector> 22 #include <string> 23  24 namespace dd { 25  26 /////////////////////////////////////////////////////////////////////////// 27  28 class Table; 29  30 /////////////////////////////////////////////////////////////////////////// 31  32  33 /** 34  The purpose of this interface is to enable retrieving the SQL statements 35  necessary to create and populate a DD table. An Object_table instance 36  may use one or more instances implementing this interface to keep track 37  of the table definitions corresponding to the supported DD versions. 38 */ 39  40  class Object_table_definition 41 { 42 public: 43   virtual ~Object_table_definition () 44  { }; 45  46  /** 47  Get the SQL DDL statement for creating the dictionary table. 48  49  @return String containing the SQL DDL statement for the target table. 50  */ 51  virtual std::string build_ddl_create_table () const= 0; 52  53  /** 54  Get the SQL DDL statement for adding foreign keys for the table. 55  56  @return String containing the SQL DDL statement for adding foreign keys. 57  */ 58  virtual std::string build_ddl_add_cyclic_foreign_keys () const= 0; 59  60  /** 61  Get the SQL DML statements for populating the table. 62  63  @return Vector of strings containing SQL DML statements 64  */ 65  virtual const std::vector<std::string> & dml_populate_statements () const= 0; 66  67  /** 68  Get dd version of the meta data representing the object table. 69  70  @return actual or target dd version, depending on context 71  */ 72  virtual uint dd_version () const= 0; 73  74  /** 75  Set dd version of the meta data representing the object table. 76  77  @param version actual or target dd version, depending on context 78  */ 79  virtual void dd_version ( uint version)= 0; 80 }; 81  82 /////////////////////////////////////////////////////////////////////////// 83  84 } 85  86 #endif // DD__OBJECT_TABLE_DEFINITION_INCLUDED 87  my_global.h This include file should be included first in every header file. dd::Object_table_definition::build_ddl_add_cyclic_foreign_keys virtual std::string build_ddl_add_cyclic_foreign_keys() const =0 Get the SQL DDL statement for adding foreign keys for the table. uint unsigned int uint Definition: my_global.h:422 dd::Object_table_definition::~Object_table_definition virtual ~Object_table_definition() Definition: object_table_definition.h:43 dd::Object_table_definition::dml_populate_statements virtual const std::vector< std::string > & dml_populate_statements() const =0 Get the SQL DML statements for populating the table. dd::Object_table_definition The purpose of this interface is to enable retrieving the SQL statements necessary to create and popu... Definition: object_table_definition.h:40 dd::Object_table_definition::dd_version virtual uint dd_version() const =0 Get dd version of the meta data representing the object table. dd::Object_table_definition::build_ddl_create_table virtual std::string build_ddl_create_table() const =0 Get the SQL DDL statement for creating the dictionary table. dd Data dictionary initialization. Definition: dictionary_client.h:27 sql dd types object_table_definition.h Generated by 1.8.11