kexi
KexiMigration::MySQLMigrate Class Reference
Inheritance diagram for KexiMigration::MySQLMigrate:

Detailed Description
Definition at line 31 of file mysqlmigrate.h.
Public Member Functions | |
MySQLMigrate (QObject *parent, const char *name, const QStringList &args=QStringList()) | |
~MySQLMigrate () | |
KexiDB::Field::Type | type (const QString &table, const MYSQL_FIELD *t) |
KexiDB::Field::Type | examineBlobField (const QString &table, const MYSQL_FIELD *fld) |
QStringList | examineEnumField (const QString &table, const MYSQL_FIELD *fld) |
void | getConstraints (int mysqlConstraints, KexiDB::Field *fld) |
void | getOptions (int flags, KexiDB::Field *fld) |
Protected Member Functions | |
virtual bool | drv_tableNames (QStringList &tablenames) |
virtual bool | drv_readTableSchema (const QString &originalName, KexiDB::TableSchema &tableSchema) |
virtual bool | drv_connect () |
virtual bool | drv_disconnect () |
virtual bool | drv_copyTable (const QString &srcTable, KexiDB::Connection *destConn, KexiDB::TableSchema *dstTable) |
virtual bool | drv_progressSupported () |
virtual bool | drv_getTableSize (const QString &table, Q_ULLONG &size) |
Constructor & Destructor Documentation
MySQLMigrate::MySQLMigrate | ( | QObject * | parent, | |
const char * | name, | |||
const QStringList & | args = QStringList() | |||
) |
MySQLMigrate::~MySQLMigrate | ( | ) |
Member Function Documentation
bool MySQLMigrate::drv_tableNames | ( | QStringList & | tableNames | ) | [protected, virtual] |
Get a list of tables and put into the supplied string list
Implements KexiMigration::KexiMigrate.
Definition at line 129 of file mysqlmigrate.cpp.
bool MySQLMigrate::drv_readTableSchema | ( | const QString & | originalName, | |
KexiDB::TableSchema & | tableSchema | |||
) | [protected, virtual] |
Get the types and properties for each column.
Implements KexiMigration::KexiMigrate.
Definition at line 84 of file mysqlmigrate.cpp.
bool MySQLMigrate::drv_connect | ( | ) | [protected, virtual] |
Connect to the db backend
Implements KexiMigration::KexiMigrate.
Definition at line 66 of file mysqlmigrate.cpp.
bool MySQLMigrate::drv_disconnect | ( | ) | [protected, virtual] |
Disconnect from the db backend
Implements KexiMigration::KexiMigrate.
Definition at line 76 of file mysqlmigrate.cpp.
bool MySQLMigrate::drv_copyTable | ( | const QString & | srcTable, | |
KexiDB::Connection * | destConn, | |||
KexiDB::TableSchema * | dstTable | |||
) | [protected, virtual] |
Copy MySQL table to KexiDB database
- Todo:
- Check that wasn't an error, rather than end of result set
Implements KexiMigration::KexiMigrate.
Definition at line 150 of file mysqlmigrate.cpp.
bool MySQLMigrate::drv_getTableSize | ( | const QString & | table, | |
Q_ULLONG & | size | |||
) | [protected, virtual] |
- Returns:
- the size of a table to be imported, or 0 if not supported Finds the size of the named table, in order to provide feedback on migration progress.
Obviously, the driver should use the same units when reporting migration progress.
- Returns:
- size of the specified table
Reimplemented from KexiMigration::KexiMigrate.
Definition at line 179 of file mysqlmigrate.cpp.
KexiDB::Field::Type MySQLMigrate::type | ( | const QString & | table, | |
const MYSQL_FIELD * | t | |||
) |
Convert a MySQL type to a KexiDB type, prompting user if necessary.
- Todo:
- : Support set column type
Definition at line 199 of file mysqlmigrate.cpp.
KexiDB::Field::Type MySQLMigrate::examineBlobField | ( | const QString & | table, | |
const MYSQL_FIELD * | fld | |||
) |
Distinguish between a BLOB and a TEXT field.
MySQL uses the same field type to identify BLOB and TEXT fields. This method queries the server to find out if a field is a binary field or a text field. It also considers the length of CHAR and VARCHAR fields to see whether Text or LongText is the appropriate Kexi field type. Assumes fld is a CHAR, VARCHAR, one of the BLOBs or TEXTs.
Definition at line 290 of file mysqlmigrate.cpp.
QStringList MySQLMigrate::examineEnumField | ( | const QString & | table, | |
const MYSQL_FIELD * | fld | |||
) |
Get the strings that identify values in an enum field.
Parse the type of a MySQL enum field as returned by the server in a 'DESCRIBE table' or 'SHOW COLUMNS FROM table' statement. The string returned by the server is in the form 'enum('option1','option2'). In this example, the result should be a string list containing two strings, "option1", "option2".
- Returns:
- list of possible values the field can take
Definition at line 339 of file mysqlmigrate.cpp.
void MySQLMigrate::getConstraints | ( | int | mysqlConstraints, | |
KexiDB::Field * | fld | |||
) |
Definition at line 404 of file mysqlmigrate.cpp.
The documentation for this class was generated from the following files: