Drizzled Public API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
drizzledump_mysql.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 "drizzledump_data.h"
23
24
class
DrizzleDumpDatabaseMySQL
;
25
class
DrizzleDumpDataMySQL
;
26
27
class
DrizzleDumpIndexMySQL
:
public
DrizzleDumpIndex
28
{
29
public
:
30
DrizzleDumpIndexMySQL
(std::string &index,
DrizzleDumpConnection
*connection)
31
:
DrizzleDumpIndex
(index, connection)
32
{ }
33
34
~
DrizzleDumpIndexMySQL
()
35
{
36
columns.clear();
37
}
38
39
};
40
41
class
DrizzleDumpFieldMySQL
:
public
DrizzleDumpField
42
{
43
public
:
44
DrizzleDumpFieldMySQL
(std::string &field,
DrizzleDumpConnection
*connection)
45
:
DrizzleDumpField
(field, connection)
46
{ }
47
48
~
DrizzleDumpFieldMySQL
() { }
49
50
void
dateTimeConvert(
void
);
51
void
setCollate(
const
char
* newCollate);
52
void
setType(
const
char
* raw_type,
const
char
* collation);
53
};
54
55
class
DrizzleDumpTableMySQL
:
public
DrizzleDumpTable
56
{
57
public
:
58
DrizzleDumpTableMySQL
(std::string &table,
DrizzleDumpConnection
*connection)
59
:
DrizzleDumpTable
(table, connection)
60
{ }
61
62
~
DrizzleDumpTableMySQL
()
63
{
64
fields.clear();
65
indexes.clear();
66
}
67
68
bool
populateFields();
69
bool
populateIndexes();
70
bool
populateFkeys();
71
void
setEngine(
const
char
* newEngine);
72
void
setCollate(
const
char
* newCollate);
73
DrizzleDumpData
* getData(
void
);
74
};
75
76
class
DrizzleDumpDatabaseMySQL
:
public
DrizzleDumpDatabase
77
{
78
public
:
79
DrizzleDumpDatabaseMySQL
(
const
std::string &database,
80
DrizzleDumpConnection
*connection)
81
:
DrizzleDumpDatabase
(database, connection)
82
{ }
83
~
DrizzleDumpDatabaseMySQL
()
84
{
85
tables.clear();
86
}
87
bool
populateTables(
void
);
88
bool
populateTables(
const
std::vector<std::string> &table_names);
89
void
setCollate(
const
char
* newCollate);
90
};
91
92
class
DrizzleDumpDataMySQL
:
public
DrizzleDumpData
93
{
94
public
:
95
DrizzleDumpDataMySQL
(
DrizzleDumpTable
*dataTable,
96
DrizzleDumpConnection
*connection);
97
~
DrizzleDumpDataMySQL
();
98
99
/* For 0000-00-00 -> NULL conversion */
100
std::string convertDate(
const
char
* oldDate)
const
;
101
/* For xx:xx:xx -> INT conversion */
102
long
convertTime(
const
char
* oldTime)
const
;
103
std::string checkDateTime(
const
char
* item, uint32_t field)
const
;
104
};
client
drizzledump_mysql.h
Generated on Fri Mar 28 2014 08:14:19 for drizzle by
1.8.1.2