Need Help in Inheriting KexiMigrate

Jaroslaw Staniek staniek at kde.org
Tue May 27 07:26:41 BST 2014


On 26 May 2014 15:36, Harshi Mistry <harshimistry at gmail.com> wrote:
>
> I need some help in understading how I will inherit KexiMigrate for
> OdbMigrate and how will it show up in importTableWizard.
> As I could understand, I will have to implement following driver-specific
> virtual functions in OdbMigrate class.
>
> bool drv_connect()
> bool drv_disconnect()
> bool drv_tableNames(QStringList& tablenames)
> bool drv_readTableSchema(const QString& originalName,KexiDB::TableSchema&
> tableSchema)

Hello Harshi,
Yes you need them.
When you implement them I encourage running the resulting migrate
driver with step by step mode of debugger (e.g. Qt Creator's one) and
setting breakpoints in the various drv_* methods to learn what happens
in the whole importing process.

> I am also not sure if I should implement drv_queryMaxNumber(),
> drv_queryStringListFromSQL() functions, which should only be implemented if
> database can already contain kexidb_* tables. I did not understand this.

kexidb__* tables deliver metadata created only in a case when source
database was created with Kexi. It's never the case for ODB, so you're
not implementing these methods.

-- 
regards / pozdrawiam, Jaroslaw Staniek
 Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org
 Qt for Tizen | http://qt-project.org/wiki/Tizen
 Qt Certified Specialist | http://www.linkedin.com/in/jstaniek



More information about the calligra-devel mailing list