kexi
mysqlmigrate.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MYSQLMIGRATE_H
00021 #define MYSQLMIGRATE_H
00022
00023 #include "migration/keximigrate.h"
00024 #include "kexidb/field.h"
00025 #include "kexidb/connection.h"
00026 #include "kexidb/drivers/mySQL/mysqlconnection_p.h"
00027
00028 namespace KexiMigration
00029 {
00030
00031 class MySQLMigrate : public KexiMigrate
00032 {
00033 Q_OBJECT
00034 KEXIMIGRATION_DRIVER
00035
00036 private:
00037 MySqlConnectionInternal *d;
00038
00039 protected:
00040
00041 virtual bool drv_tableNames(QStringList& tablenames);
00042
00043
00044 virtual bool drv_readTableSchema(
00045 const QString& originalName, KexiDB::TableSchema& tableSchema);
00046
00047 virtual bool drv_connect();
00048 virtual bool drv_disconnect();
00049
00050 virtual bool drv_copyTable(const QString& srcTable,
00051 KexiDB::Connection *destConn, KexiDB::TableSchema* dstTable);
00052
00053 virtual bool drv_progressSupported() { return true; }
00054 virtual bool drv_getTableSize(const QString& table, Q_ULLONG& size);
00055
00056
00057
00058
00059
00060
00061 public:
00062
00063 MySQLMigrate(QObject *parent, const char *name, const QStringList& args = QStringList());
00064 ~MySQLMigrate();
00065
00066 KexiDB::Field::Type type(const QString& table, const MYSQL_FIELD* t);
00067
00068 KexiDB::Field::Type examineBlobField(const QString& table,
00069 const MYSQL_FIELD* fld);
00070
00071 QStringList examineEnumField(const QString& table,
00072 const MYSQL_FIELD* fld);
00073 void getConstraints(int mysqlConstraints, KexiDB::Field* fld);
00074 void getOptions(int flags, KexiDB::Field* fld);
00075 };
00076 }
00077
00078 #endif
|