NAMESPACE::MySqlConnectionInternal Class Reference
#include <mysqlconnection_p.h>
Inheritance diagram for NAMESPACE::MySqlConnectionInternal:

Detailed Description
Internal MySQL connection data.Provides a low-level API for accessing MySQL databases, that can be shared by any module that needs direct access to the underlying database. Used by the KexiDB and KexiMigration drivers.
Definition at line 54 of file mysqlconnection_p.h.
Public Member Functions | |
| MySqlConnectionInternal (KexiDB::Connection *connection) | |
| virtual | ~MySqlConnectionInternal () |
| bool | db_connect (const KexiDB::ConnectionData &data) |
| Connects to a MySQL database. | |
| bool | db_disconnect () |
| Disconnects from the database. | |
| bool | useDatabase (const QString &dbName=QString::null) |
| Selects a database that is about to be used. | |
| bool | executeSQL (const QString &statement) |
| Execute SQL statement on the database. | |
| virtual void | storeResult () |
| Stores last operation's result. | |
| QString | escapeIdentifier (const QString &str) const |
| Escapes a table, database or column name. | |
Public Attributes | |
| MYSQL * | mysql |
| bool | mysql_owned |
| true if mysql pointer should be freed on destruction | |
| QString | errmsg |
| server-specific message of last operation | |
| int | res |
| result code of last operation on server | |
Constructor & Destructor Documentation
|
|
Definition at line 41 of file mysqlconnection_p.cpp. |
|
|
Definition at line 49 of file mysqlconnection_p.cpp. References mysql, and mysql_owned. |
Member Function Documentation
|
|
Connects to a MySQL database. Connects to the MySQL server on host as the given user using the specified password. If host is "localhost", then a socket on the local file system can be specified to connect to the server (several defaults will be tried if none is specified). If the server is on a remote machine, then a port is the port that the remote server is listening on.
Definition at line 72 of file mysqlconnection_p.cpp. References db_disconnect(), KexiDB::ConnectionDataBase::hostName, KexiDBDrvDbg, KexiDB::ConnectionDataBase::localSocketFileName, mysql, KexiDB::ConnectionDataBase::password, KexiDB::ConnectionDataBase::port, storeResult(), KexiDB::ConnectionDataBase::useLocalSocketFile, and KexiDB::ConnectionDataBase::userName. Referenced by KexiMigration::MySQLMigrate::drv_connect(). |
|
|
Disconnects from the database. Disconnects from the database. Definition at line 123 of file mysqlconnection_p.cpp. References KexiDBDrvDbg, and mysql. Referenced by db_connect(), and KexiMigration::MySQLMigrate::drv_disconnect(). |
|
|
Escapes a table, database or column name.
Definition at line 156 of file mysqlconnection_p.cpp. |
|
|
Execute SQL statement on the database. Executes the given SQL statement on the server. Definition at line 141 of file mysqlconnection_p.cpp. References mysql, and storeResult(). Referenced by KexiMigration::MySQLMigrate::drv_copyTable(), KexiMigration::MySQLMigrate::drv_fetchRecordFromSQL(), KexiMigration::MySQLMigrate::drv_getTableSize(), KexiMigration::MySQLMigrate::drv_queryStringListFromSQL(), KexiMigration::MySQLMigrate::drv_readTableSchema(), KexiMigration::MySQLMigrate::drv_tableNames(), KexiMigration::MySQLMigrate::examineBlobField(), KexiMigration::MySQLMigrate::examineEnumField(), and useDatabase(). |
|
|
Stores last operation's result.
Implements KexiDB::ConnectionInternal. Definition at line 57 of file mysqlconnection_p.cpp. References errmsg, mysql, and res. Referenced by db_connect(), and executeSQL(). |
|
|
Selects a database that is about to be used. Selects dbName as the active database so it can be used. Definition at line 134 of file mysqlconnection_p.cpp. References executeSQL(). Referenced by KexiMigration::MySQLMigrate::drv_connect(). |
Member Data Documentation
|
|
server-specific message of last operation
Definition at line 80 of file mysqlconnection_p.h. Referenced by storeResult(). |
|
|
|
true if mysql pointer should be freed on destruction
Definition at line 79 of file mysqlconnection_p.h. Referenced by NAMESPACE::MySqlCursorData::MySqlCursorData(), and ~MySqlConnectionInternal(). |
|
|
result code of last operation on server
Definition at line 81 of file mysqlconnection_p.h. Referenced by storeResult(). |
The documentation for this class was generated from the following files:
