KexiDB::Object Class Reference
#include <object.h>
Inheritance diagram for KexiDB::Object:

Detailed Description
Prototype of KexiDB object, handles result of last operation.
Definition at line 34 of file object.h.
Public Member Functions | |
| bool | error () const |
| const QString & | errorMsg () const |
| int | errorNum () const |
| int | previousServerResult () const |
| QString | previousServerResultName () const |
| void | debugError () |
| virtual void | clearError () |
| virtual QString | serverErrorMsg () |
| virtual int | serverResult () |
| virtual QString | serverResultName () |
| QString | msgTitle () const |
| const QString | recentSQLString () const |
Protected Member Functions | |
| Object (MessageHandler *handler=0) | |
| virtual | ~Object () |
| virtual void | setError (int code=ERR_OTHER, const QString &msg=QString::null) |
| virtual void | setError (const QString &msg) |
| virtual void | setError (const QString &title, const QString &msg) |
| void | setError (KexiDB::Object *obj, const QString &prependMessage=QString::null) |
| virtual void | setError (KexiDB::Object *obj, int code, const QString &prependMessage=QString::null) |
| virtual int | askQuestion (const QString &message, KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const QString &dontShowAskAgainName=QString::null, int options=KMessageBox::Notify, MessageHandler *msgHandler=0) |
| virtual void | drv_clearServerResult () |
Protected Attributes | |
| QString | m_sql |
| used to store of actually executed SQL statement | |
| QString | m_errorSql |
| used to store of actually executed SQL statement | |
| int | m_serverResult |
| QString | m_serverResultName |
| QString | m_serverErrorMsg |
| QString | m_errMsg |
Friends | |
| class | MessageTitle |
Constructor & Destructor Documentation
|
|
Definition at line 32 of file object.cpp. References clearError(). |
|
|
Definition at line 41 of file object.cpp. |
Member Function Documentation
|
||||||||||||||||||||||||||||||||||||
|
Interactively asks a question. Console or GUI can be used for this, depending on installed message handler. For GUI version, KMessageBox class is used. See KexiDB::MessageHandler::askQuestion() for details. Definition at line 174 of file object.cpp. References KexiDB::MessageHandler::askQuestion(). Referenced by KexiDB::SQLiteConnection::drv_useDatabase(). |
|
|
|
Sends errorMsg() to debug output. Definition at line 159 of file object.cpp. References error(), errorMsg(), KexiDBDbg, serverErrorMsg(), serverResult(), and serverResultName(). Referenced by KexiSimplePrintingEngine::init(), KexiMigration::KexiMigrate::performImport(), and KexiTableDesignerView::storeData(). |
|
|
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.
Reimplemented in KexiDB::Cursor, KexiDB::DriverManager, KexiDB::MySqlConnection, KexiDB::MySqlCursor, KexiDB::pqxxSqlConnection, KexiDB::pqxxSqlCursor, KexiDB::SQLiteConnection, KexiDB::SQLiteCursor, and KexiMigration::MigrateManager. Definition at line 158 of file object.h. Referenced by clearError(). |
|
|
|
Definition at line 42 of file object.h. Referenced by KexiProject::createConnection(), debugError(), KexiMigration::MigrateManager::driver(), KexiMigration::MigrateManager::driverNames(), KexiStartupHandler::init(), internalReason(), and KexiDB::Connection::loadExtendedTableSchemaData(). |
|
|
Definition at line 46 of file object.h. Referenced by setError(), and KexiDB::Connection::useTemporaryDatabaseIfNeeded(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KexiDB library offers detailed error numbers using errorNum() and detailed error i18n'd messages using errorMsg() - this information is not engine-dependent (almost). Use this in your application to give users more information on what's up. This method returns (non-i18n'd !) engine-specific error message, if there was any error during last server-side operation, otherwise null string. Reimplement this for your driver
Reimplemented in KexiDB::Cursor, KexiDB::DriverManager, KexiDB::MySqlConnection, KexiDB::MySqlCursor, KexiDB::pqxxSqlConnection, KexiDB::SQLiteConnection, KexiDB::SQLiteCursor, and KexiMigration::MigrateManager. Definition at line 144 of file object.cpp. References m_serverErrorMsg. Referenced by debugError(), and KexiDB::SQLiteConnection::serverErrorMsg(). |
|
|
Reimplemented in KexiDB::Cursor, KexiDB::DriverManager, KexiDB::MySqlConnection, KexiDB::MySqlCursor, KexiDB::pqxxSqlConnection, KexiDB::SQLiteConnection, KexiDB::SQLiteCursor, and KexiMigration::MigrateManager. Definition at line 149 of file object.cpp. References m_serverResult. Referenced by debugError(), and KexiDB::SQLiteConnection::serverResult(). |
|
|
Reimplemented in KexiDB::Cursor, KexiDB::DriverManager, KexiDB::MySqlConnection, KexiDB::MySqlCursor, KexiDB::pqxxSqlConnection, KexiDB::SQLiteConnection, KexiDB::SQLiteCursor, and KexiMigration::MigrateManager. Definition at line 154 of file object.cpp. References m_serverResultName. Referenced by debugError(), and KexiDB::SQLiteConnection::serverResultName(). |
|
||||||||||||||||
|
Copies the (localized) error message and code from other KexiDB::Object with custom error code. Definition at line 96 of file object.cpp. References ERR_OTHER, ERRMSG, m_errMsg, m_errorSql, m_serverErrorMsg, m_serverResult, m_serverResultName, m_sql, setError(), and STORE_PREV_ERR. |
|
||||||||||||
|
Copies the (localized) error message and code from other KexiDB::Object. Definition at line 91 of file object.cpp. References ERR_OTHER, errorNum(), and setError(). |
|
||||||||||||
|
Definition at line 74 of file object.cpp. References ERR_OTHER, ERRMSG, m_errMsg, m_errorSql, m_sql, and STORE_PREV_ERR. |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Also sets title. Definition at line 69 of file object.cpp. References ERR_OTHER, and setError(). |
|
||||||||||||
Friends And Related Function Documentation
|
|
|
Member Data Documentation
|
|
Definition at line 164 of file object.h. Referenced by clearError(), KexiDB::Connection::executeSQL(), and setError(). |
|
|
used to store of actually executed SQL statement
Definition at line 158 of file object.h. Referenced by clearError(), KexiDB::Connection::executeSQL(), and setError(). |
|
|
Definition at line 163 of file object.h. Referenced by clearError(), serverErrorMsg(), and setError(). |
|
|
Definition at line 162 of file object.h. Referenced by clearError(), serverResult(), and setError(). |
|
|
Reimplemented in KexiDB::DriverManagerInternal, and KexiMigration::MigrateManagerInternal. Definition at line 163 of file object.h. Referenced by clearError(), serverResultName(), and setError(). |
|
The documentation for this class was generated from the following files:
