1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
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 |
||
2371.1.1
by Brian Aker
Fedora fix/use fwd header for iostream. |
20 |
#pragma once
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
21 |
|
2449.1.2
by Brian Aker
Additional fixes for libdrizzle. |
22 |
#include "client/drizzledump_data.h" |
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
23 |
|
24 |
class DrizzleDumpDatabaseDrizzle; |
|
25 |
class DrizzleDumpDataDrizzle; |
|
26 |
||
1810.6.4
by Andrew Hutchings
Add foreign keys to Drizzle server |
27 |
class DrizzleDumpForeignKeyDrizzle : public DrizzleDumpForeignKey |
28 |
{
|
|
29 |
public: |
|
30 |
DrizzleDumpForeignKeyDrizzle(std::string name, DrizzleDumpConnection* connection) : DrizzleDumpForeignKey(name, connection) |
|
31 |
{ } |
|
32 |
||
33 |
~DrizzleDumpForeignKeyDrizzle() |
|
34 |
{
|
|
35 |
}
|
|
36 |
};
|
|
37 |
||
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
38 |
class DrizzleDumpIndexDrizzle : public DrizzleDumpIndex |
39 |
{
|
|
40 |
public: |
|
1751.4.20
by Andrew Hutchings
Add database connection class and the start of a database output ostream |
41 |
DrizzleDumpIndexDrizzle(std::string &index, DrizzleDumpConnection *connection) |
42 |
: DrizzleDumpIndex(index, connection) |
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
43 |
{ } |
44 |
||
45 |
~DrizzleDumpIndexDrizzle() |
|
46 |
{
|
|
47 |
columns.clear(); |
|
48 |
}
|
|
49 |
};
|
|
50 |
||
51 |
class DrizzleDumpFieldDrizzle : public DrizzleDumpField |
|
52 |
{
|
|
53 |
public: |
|
1751.4.20
by Andrew Hutchings
Add database connection class and the start of a database output ostream |
54 |
DrizzleDumpFieldDrizzle(std::string &field, DrizzleDumpConnection *connection) |
55 |
: DrizzleDumpField(field, connection) |
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
56 |
{ } |
57 |
||
58 |
~DrizzleDumpFieldDrizzle() { } |
|
59 |
||
60 |
void setType(const char* raw_type, const char* collation); |
|
61 |
};
|
|
62 |
||
63 |
class DrizzleDumpTableDrizzle : public DrizzleDumpTable |
|
64 |
{
|
|
65 |
public: |
|
1751.4.20
by Andrew Hutchings
Add database connection class and the start of a database output ostream |
66 |
DrizzleDumpTableDrizzle(std::string &table, DrizzleDumpConnection *connection) |
67 |
: DrizzleDumpTable(table, connection) |
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
68 |
{ } |
69 |
||
70 |
~DrizzleDumpTableDrizzle() |
|
71 |
{
|
|
72 |
fields.clear(); |
|
73 |
indexes.clear(); |
|
1810.6.4
by Andrew Hutchings
Add foreign keys to Drizzle server |
74 |
fkeys.clear(); |
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
75 |
}
|
76 |
bool populateFields(); |
|
77 |
bool populateIndexes(); |
|
1810.6.4
by Andrew Hutchings
Add foreign keys to Drizzle server |
78 |
bool populateFkeys(); |
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
79 |
DrizzleDumpData* getData(void); |
80 |
};
|
|
81 |
||
82 |
class DrizzleDumpDatabaseDrizzle : public DrizzleDumpDatabase |
|
83 |
{
|
|
84 |
public: |
|
1751.4.20
by Andrew Hutchings
Add database connection class and the start of a database output ostream |
85 |
DrizzleDumpDatabaseDrizzle(const std::string &database, |
86 |
DrizzleDumpConnection *connection) |
|
87 |
: DrizzleDumpDatabase(database, connection) |
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
88 |
{ } |
89 |
||
90 |
~DrizzleDumpDatabaseDrizzle() |
|
91 |
{
|
|
92 |
tables.clear(); |
|
93 |
}
|
|
1751.4.23
by Andrew Hutchings
Fix various bugs |
94 |
bool populateTables(void); |
95 |
bool populateTables(const std::vector<std::string> &table_names); |
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
96 |
void setCollate(const char* newCollate); |
97 |
||
98 |
};
|
|
99 |
||
100 |
class DrizzleDumpDataDrizzle : public DrizzleDumpData |
|
101 |
{
|
|
102 |
public: |
|
1751.4.20
by Andrew Hutchings
Add database connection class and the start of a database output ostream |
103 |
DrizzleDumpDataDrizzle(DrizzleDumpTable *dataTable, |
104 |
DrizzleDumpConnection *connection); |
|
1751.4.19
by Andrew Hutchings
Put drizzle and mysql processes in seperate classes/files |
105 |
~DrizzleDumpDataDrizzle(); |
106 |
};
|