KexiDB::pqxxSqlConnection Class Reference
#include <pqxxconnection.h>
Inheritance diagram for KexiDB::pqxxSqlConnection:

Detailed Description
- Author:
- Adam Pigg
Definition at line 48 of file pqxxconnection.h.
Public Member Functions | |
| virtual | ~pqxxSqlConnection () |
| virtual Cursor * | prepareQuery (const QString &statement=QString::null, uint cursor_options=0) |
| virtual Cursor * | prepareQuery (QuerySchema &query, uint cursor_options=0) |
| virtual PreparedStatement::Ptr | prepareStatement (PreparedStatement::StatementType type, FieldList &fields) |
Protected Member Functions | |
| pqxxSqlConnection (Driver *driver, ConnectionData &conn_data) | |
| virtual bool | drv_isDatabaseUsed () const |
| virtual bool | drv_connect (KexiDB::ServerVersionInfo &version) |
| virtual bool | drv_disconnect () |
| virtual bool | drv_getDatabasesList (QStringList &list) |
| virtual bool | drv_createDatabase (const QString &dbName=QString::null) |
| virtual bool | drv_useDatabase (const QString &dbName=QString::null, bool *cancelled=0, MessageHandler *msgHandler=0) |
| virtual bool | drv_closeDatabase () |
| virtual bool | drv_dropDatabase (const QString &dbName=QString::null) |
| virtual bool | drv_executeSQL (const QString &statement) |
| virtual Q_ULLONG | drv_lastInsertRowID () |
| virtual bool | drv_getTablesList (QStringList &list) |
| virtual bool | drv_containsTable (const QString &tableName) |
| virtual TransactionData * | drv_beginTransaction () |
| virtual bool | drv_commitTransaction (TransactionData *) |
| virtual bool | drv_rollbackTransaction (TransactionData *) |
| virtual int | serverResult () |
| virtual QString | serverResultName () |
| virtual void | drv_clearServerResult () |
| virtual QString | serverErrorMsg () |
Protected Attributes | |
| pqxxSqlConnectionInternal * | d |
| for future extensions | |
Friends | |
| class | pqxxSqlDriver |
| class | pqxxSqlCursor |
| class | pqxxTransactionData |
Constructor & Destructor Documentation
|
|
Definition at line 64 of file pqxxconnection.cpp. References d, and KexiDB::Connection::destroy(). |
|
||||||||||||
|
Definition at line 55 of file pqxxconnection.cpp. |
Member Function Documentation
|
|
Note for driver developers: begins new transaction and returns handle to it. Default implementation just executes "BEGIN" sql statement and returns just empty data (TransactionData object). Drivers that do not support transactions (see Driver::features()) do never call this method. Reimplement this method if you need to do something more (e.g. if you driver will support multiple transactions per connection). Make subclass of TransactionData (declared in transaction.h) and return object of this subclass. You should return NULL if any error occurred. Do not check anything in connection (isConnected(), etc.) - all is already done. Reimplemented from KexiDB::Connection. Definition at line 368 of file pqxxconnection.cpp. References pqxxTransactionData. |
|
|
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 from KexiDB::Object. Definition at line 427 of file pqxxconnection.cpp. References d, and KexiDB::pqxxSqlConnectionInternal::resultCode. |
|
|
For reimplemenation: closes previously opened database using connection. Implements KexiDB::Connection. Definition at line 228 of file pqxxconnection.cpp. References d, KexiDBDrvDbg, and KexiDB::pqxxSqlConnectionInternal::pqxxsql. |
|
|
Reimplemented from KexiDB::Connection. Definition at line 373 of file pqxxconnection.cpp. References d, KexiDB::pqxxSqlConnectionInternal::errmsg, and KexiDB::Object::setError(). Referenced by drv_executeSQL(). |
|
|
For reimplemenation: connects to database. version should be set to real server's version.
Implements KexiDB::Connection. Definition at line 97 of file pqxxconnection.cpp. References KexiDB::ServerVersionInfo::clear(), d, KexiDBDrvDbg, and KexiDB::pqxxSqlConnectionInternal::version. |
|
|
LOW LEVEL METHOD. For reimplemenation: returns true if table with name tableName exists in the database.
Implements KexiDB::Connection. Definition at line 339 of file pqxxconnection.cpp. References KexiDB::Connection::driver(), and KexiDB::Connection::resultExists(). |
|
|
For reimplemenation: creates new database using connection Implements KexiDB::Connection. Definition at line 141 of file pqxxconnection.cpp. References KexiDB::Connection::executeSQL(), and KexiDBDrvDbg. |
|
|
For reimplemenation: disconnects database
Implements KexiDB::Connection. Definition at line 111 of file pqxxconnection.cpp. References KexiDBDrvDbg. |
|
|
For reimplemenation: drops database from the server using connection. After drop, database shouldn't be accessible anymore. Implements KexiDB::Connection. Definition at line 247 of file pqxxconnection.cpp. References KexiDB::Connection::executeSQL(), and KexiDBDrvDbg. |
|
|
Executes query statement, but without returning resulting rows (used mostly for functional queries). Only use this method if you really need. Implements KexiDB::Connection. Definition at line 260 of file pqxxconnection.cpp. References d, KexiDB::pqxxTransactionData::data, drv_commitTransaction(), KexiDB::pqxxSqlConnectionInternal::errmsg, KexiDBDrvDbg, pqxxTransactionData, and KexiDB::pqxxSqlConnectionInternal::res. Referenced by drv_useDatabase(). |
|
|
For reimplemenation: loads list of databases' names available for this connection and adds these names to list. If your server is not able to offer such a list, consider reimplementing drv_databaseExists() instead. The method should return true only if there was no error on getting database names list from the server. Default implementation puts empty list into list and returns true. Reimplemented from KexiDB::Connection. Definition at line 119 of file pqxxconnection.cpp. References d, KexiDB::Connection::executeSQL(), and KexiDB::pqxxSqlConnectionInternal::res. |
|
|
LOW LEVEL METHOD. For reimplemenation: loads low-level list of table names available for this connection. The names are in lower case. The method should return true only if there was no error on getting database names list from the server. Implements KexiDB::Connection. Definition at line 346 of file pqxxconnection.cpp. References KexiDB::Connection::deleteCursor(), KexiDB::Cursor::eof(), KexiDB::Object::error(), KexiDB::Connection::executeQuery(), KexiDBDrvWarn, KexiDB::Object::m_sql, KexiDB::Cursor::moveFirst(), KexiDB::Cursor::moveNext(), and KexiDB::Cursor::value(). |
|
|
Reimplemented from KexiDB::Connection. Definition at line 309 of file pqxxconnection.cpp. References d, and KexiDB::pqxxSqlConnectionInternal::pqxxsql. |
|
|
Implements KexiDB::Connection. Definition at line 320 of file pqxxconnection.cpp. References d, and KexiDB::pqxxSqlConnectionInternal::res. |
|
|
Note for driver developers: begins new transaction and returns handle to it. Default implementation just executes "ROLLBACK" sql statement and returns true on success.
Reimplemented from KexiDB::Connection. Definition at line 395 of file pqxxconnection.cpp. References d, and KexiDB::pqxxSqlConnectionInternal::errmsg. |
|
||||||||||||||||
|
Implements KexiDB::Connection. Definition at line 153 of file pqxxconnection.cpp. References d, KexiDB::Connection::data(), drv_executeSQL(), KexiDB::pqxxSqlConnectionInternal::errmsg, KexiDBDrvDbg, KexiDB::pqxxSqlConnectionInternal::pqxxsql, and KexiDB::pqxxSqlConnectionInternal::version. |
|
||||||||||||
|
Implements KexiDB::Connection. Definition at line 81 of file pqxxconnection.cpp. References pqxxSqlCursor. |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Statement is build from data provided by table schema, it is like "select * from table_name". Implements KexiDB::Connection. Definition at line 73 of file pqxxconnection.cpp. References pqxxSqlCursor. |
|
||||||||||||
|
Prepare a SQL statement and return a PreparedStatement instance. Implements KexiDB::Connection. Definition at line 437 of file pqxxconnection.cpp. References d. |
|
|
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 from KexiDB::Object. Definition at line 432 of file pqxxconnection.cpp. References d, and KexiDB::pqxxSqlConnectionInternal::errmsg. |
|
|
Reimplemented from KexiDB::Object. Definition at line 417 of file pqxxconnection.cpp. References d, and KexiDB::pqxxSqlConnectionInternal::resultCode. |
|
|
Reimplemented from KexiDB::Object. Definition at line 422 of file pqxxconnection.cpp. |
Friends And Related Function Documentation
|
|
Definition at line 100 of file pqxxconnection.h. Referenced by prepareQuery(). |
|
|
Definition at line 99 of file pqxxconnection.h. |
|
|
Definition at line 101 of file pqxxconnection.h. Referenced by drv_beginTransaction(), and drv_executeSQL(). |
Member Data Documentation
|
|
for future extensions
Reimplemented from KexiDB::Connection. Definition at line 90 of file pqxxconnection.h. Referenced by drv_clearServerResult(), drv_closeDatabase(), drv_commitTransaction(), drv_connect(), drv_executeSQL(), drv_getDatabasesList(), drv_isDatabaseUsed(), drv_lastInsertRowID(), drv_rollbackTransaction(), drv_useDatabase(), prepareStatement(), serverErrorMsg(), serverResult(), and ~pqxxSqlConnection(). |
The documentation for this class was generated from the following files:
