Drizzled Public API Documentation

drizzledump_drizzle.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2010 Andrew Hutchings
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #ifndef CLIENT_DRIZZLEDUMP_DRIZZLE_H
00021 #define CLIENT_DRIZZLEDUMP_DRIZZLE_H
00022 
00023 #include "drizzledump_data.h"
00024 
00025 class DrizzleDumpDatabaseDrizzle;
00026 class DrizzleDumpDataDrizzle;
00027 
00028 class DrizzleDumpForeignKeyDrizzle : public DrizzleDumpForeignKey
00029 {
00030   public:
00031     DrizzleDumpForeignKeyDrizzle(std::string name, DrizzleDumpConnection* connection) : DrizzleDumpForeignKey(name, connection)
00032     { }
00033 
00034     ~DrizzleDumpForeignKeyDrizzle()
00035     {
00036     }
00037 };
00038 
00039 class DrizzleDumpIndexDrizzle : public DrizzleDumpIndex
00040 {
00041   public:
00042     DrizzleDumpIndexDrizzle(std::string &index, DrizzleDumpConnection *connection)
00043     : DrizzleDumpIndex(index, connection)
00044     { }
00045 
00046     ~DrizzleDumpIndexDrizzle()
00047     {
00048       columns.clear();
00049     }
00050 };
00051 
00052 class DrizzleDumpFieldDrizzle : public DrizzleDumpField
00053 {
00054   public:
00055     DrizzleDumpFieldDrizzle(std::string &field, DrizzleDumpConnection *connection)
00056     : DrizzleDumpField(field, connection)
00057     { }
00058 
00059     ~DrizzleDumpFieldDrizzle() { }
00060 
00061     void setType(const char* raw_type, const char* collation);
00062 };
00063 
00064 class DrizzleDumpTableDrizzle : public DrizzleDumpTable
00065 {
00066   public:
00067     DrizzleDumpTableDrizzle(std::string &table, DrizzleDumpConnection *connection)
00068     : DrizzleDumpTable(table, connection)
00069     { }
00070 
00071     ~DrizzleDumpTableDrizzle()
00072     {
00073       fields.clear();
00074       indexes.clear();
00075       fkeys.clear();
00076     }
00077     bool populateFields();
00078     bool populateIndexes();
00079     bool populateFkeys();
00080     DrizzleDumpData* getData(void);
00081 };
00082 
00083 class DrizzleDumpDatabaseDrizzle : public DrizzleDumpDatabase
00084 {
00085   public:
00086     DrizzleDumpDatabaseDrizzle(const std::string &database,
00087       DrizzleDumpConnection *connection)
00088     : DrizzleDumpDatabase(database, connection)
00089     { }
00090 
00091     ~DrizzleDumpDatabaseDrizzle()
00092     {
00093       tables.clear();
00094     }
00095     bool populateTables(void);
00096     bool populateTables(const std::vector<std::string> &table_names);
00097     void setCollate(const char* newCollate);
00098 
00099 };
00100 
00101 class DrizzleDumpDataDrizzle : public DrizzleDumpData
00102 {
00103   public:
00104     DrizzleDumpDataDrizzle(DrizzleDumpTable *dataTable,
00105       DrizzleDumpConnection *connection);
00106     ~DrizzleDumpDataDrizzle();
00107 };
00108 
00109 
00110 #endif /* CLIENT_DRIZZLEDUMP_DRIZZLE_H */