Drizzled Public API Documentation

drizzledump_drizzle.h
1 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3  *
4  * Copyright (C) 2010 Andrew Hutchings
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #pragma once
21 
22 #include "client/drizzledump_data.h"
23 
26 
28 {
29  public:
30  DrizzleDumpForeignKeyDrizzle(std::string name, DrizzleDumpConnection* connection) : DrizzleDumpForeignKey(name, connection)
31  { }
32 
34  {
35  }
36 };
37 
39 {
40  public:
41  DrizzleDumpIndexDrizzle(std::string &index, DrizzleDumpConnection *connection)
42  : DrizzleDumpIndex(index, connection)
43  { }
44 
46  {
47  columns.clear();
48  }
49 };
50 
52 {
53  public:
54  DrizzleDumpFieldDrizzle(std::string &field, DrizzleDumpConnection *connection)
55  : DrizzleDumpField(field, connection)
56  { }
57 
59 
60  void setType(const char* raw_type, const char* collation);
61 };
62 
64 {
65  public:
66  DrizzleDumpTableDrizzle(std::string &table, DrizzleDumpConnection *connection)
67  : DrizzleDumpTable(table, connection)
68  { }
69 
71  {
72  fields.clear();
73  indexes.clear();
74  fkeys.clear();
75  }
76  bool populateFields();
77  bool populateIndexes();
78  bool populateFkeys();
79  DrizzleDumpData* getData(void);
80 };
81 
83 {
84  public:
85  DrizzleDumpDatabaseDrizzle(const std::string &database,
86  DrizzleDumpConnection *connection)
87  : DrizzleDumpDatabase(database, connection)
88  { }
89 
91  {
92  tables.clear();
93  }
94  bool populateTables(void);
95  bool populateTables(const std::vector<std::string> &table_names);
96  void setCollate(const char* newCollate);
97 
98 };
99 
101 {
102  public:
104  DrizzleDumpConnection *connection);
106 };