KexiMigration::MigrateManager Class Reference

#include <migratemanager.h>

Inheritance diagram for KexiMigration::MigrateManager:
KexiDB::Object

Public Types

typedef TQMap< TQString, KService::Ptr > ServicesMap
 

Public Member Functions

KexiMigrate * driver (const TQString &name)
 
const TQStringList driverNames ()
 
TQString driverForMimeType (const TQString &mimeType)
 
virtual TQString serverErrorMsg ()
 
virtual int serverResult ()
 
virtual TQString serverResultName ()
 
TQString possibleProblemsInfoMsg () const
 
- Public Member Functions inherited from KexiDB::Object
bool error () const
 
const TQString & errorMsg () const
 
int errorNum () const
 
int previousServerResult () const
 
TQString previousServerResultName () const
 
void debugError ()
 
virtual void clearError ()
 
TQString msgTitle () const
 
const TQString recentSQLString () const
 

Protected Member Functions

virtual void drv_clearServerResult ()
 
- Protected Member Functions inherited from KexiDB::Object
 Object (MessageHandler *handler=0)
 
virtual void setError (int code=ERR_OTHER, const TQString &msg=TQString())
 
virtual void setError (const TQString &msg)
 
virtual void setError (const TQString &title, const TQString &msg)
 
void setError (KexiDB::Object *obj, const TQString &prependMessage=TQString())
 
virtual void setError (KexiDB::Object *obj, int code, const TQString &prependMessage=TQString())
 
virtual int askQuestion (const TQString &message, KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontShowAskAgainName=TQString(), int options=KMessageBox::Notify, MessageHandler *msgHandler=0)
 

Additional Inherited Members

- Protected Attributes inherited from KexiDB::Object
TQString m_sql
 
TQString m_errorSql
 
int m_serverResult
 
TQString m_serverResultName
 
TQString m_serverErrorMsg
 
TQString m_errMsg
 

Detailed Description

Migration library management, for finding and loading mogration drivers.

Definition at line 38 of file migratemanager.h.

Member Typedef Documentation

◆ ServicesMap

typedef TQMap<TQString, KService::Ptr> KexiMigration::MigrateManager::ServicesMap

Definition at line 41 of file migratemanager.h.

Constructor & Destructor Documentation

◆ MigrateManager()

MigrateManager::MigrateManager ( )

Definition at line 254 of file migratemanager.cpp.

◆ ~MigrateManager()

MigrateManager::~MigrateManager ( )
virtual

Definition at line 265 of file migratemanager.cpp.

Member Function Documentation

◆ driver()

KexiMigrate * MigrateManager::driver ( const TQString &  name)

Tries to load db driver with named name name. The name is case insensitive.

Returns
db driver, or 0 if error (then error message is also set)

Definition at line 324 of file migratemanager.cpp.

◆ driverForMimeType()

TQString MigrateManager::driverForMimeType ( const TQString &  mimeType)

Looks up a drivers list by MIME type of database file. Only file-based database drivers are checked. The lookup is case insensitive.

Returns
driver name or null string if no driver found.

Definition at line 307 of file migratemanager.cpp.

◆ driverNames()

const TQStringList MigrateManager::driverNames ( )

returns list of available drivers names. That drivers can be loaded by first use of driver() method.

Definition at line 287 of file migratemanager.cpp.

◆ drv_clearServerResult()

void MigrateManager::drv_clearServerResult ( )
protectedvirtual

Clears number of last server operation's result stored as a single integer. Formally, this integer should be set to value that means "NO ERRORS" or "OK". This method is called by clearError(). For reimplementation. By default does nothing.

See also
serverErrorMsg()

Reimplemented from KexiDB::Object.

Definition at line 349 of file migratemanager.cpp.

◆ possibleProblemsInfoMsg()

TQString MigrateManager::possibleProblemsInfoMsg ( ) const
Todo:
copied from KexiDB::DriverManager, merge it.

HTML information about possible problems encountered. It's displayed in 'details' section, if an error encountered. Currently it contains a list of incompatible migration drivers.

Definition at line 356 of file migratemanager.cpp.

◆ serverErrorMsg()

TQString MigrateManager::serverErrorMsg ( )
virtual

server error is set if there is error at KService level (useful for debugging)

Reimplemented from KexiDB::Object.

Definition at line 334 of file migratemanager.cpp.

◆ serverResult()

int MigrateManager::serverResult ( )
virtual
Returns
engine-specific last server-side operation result number. Use this in your application to give users more information on what's up.

Reimplement this for your driver - default implementation just returns 0. Note that this result value is not the same as the one returned by errorNum() (Object::m_errno member)

See also
serverErrorMsg(), drv_clearServerResult()

Reimplemented from KexiDB::Object.

Definition at line 339 of file migratemanager.cpp.

◆ serverResultName()

TQString MigrateManager::serverResultName ( )
virtual
Returns
engine-specific last server-side operation result name, (name for serverResult()). Use this in your application to give users more information on what's up.

Reimplement this for your driver - default implementation just returns null string. Note that this result name is not the same as the error message returned by serverErorMsg() or erorMsg()

See also
serverErrorMsg(), drv_clearServerResult()

Reimplemented from KexiDB::Object.

Definition at line 344 of file migratemanager.cpp.


The documentation for this class was generated from the following files: