kexi

KexiDB::MySqlDriver Class Reference

#include <mysqldriver.h>

Inheritance diagram for KexiDB::MySqlDriver:

KexiDB::Driver KexiDB::Object List of all members.

Detailed Description

MySQL database driver.

Definition at line 30 of file mysqldriver.h.


Public Member Functions

 MySqlDriver (QObject *parent, const char *name, const QStringList &args=QStringList())
virtual ~MySqlDriver ()
virtual bool isSystemDatabaseName (const QString &n) const
virtual QString escapeString (const QString &str) const
virtual QCString escapeString (const QCString &str) const
virtual QString escapeBLOB (const QByteArray &array) const

Protected Member Functions

virtual QString drv_escapeIdentifier (const QString &str) const
virtual QCString drv_escapeIdentifier (const QCString &str) const
virtual Connectiondrv_createConnection (ConnectionData &conn_data)
virtual bool drv_isSystemFieldName (const QString &n) const

Constructor & Destructor Documentation

MySqlDriver::MySqlDriver ( QObject *  parent,
const char *  name,
const QStringList &  args = QStringList() 
)

Constructor sets database features and maps the types in KexiDB::Field::Type to the MySQL types.

See: http://dev.mysql.com/doc/mysql/en/Column_types.html

Definition at line 57 of file mysqldriver.cpp.


Member Function Documentation

bool MySqlDriver::isSystemDatabaseName ( const QString &  n  )  const [virtual]

Returns:
true if n is a system database's name, eg. name of build-in, system database that cannot be used or created by a user, and in most cases user even shouldn't see this. The list is specific for a given driver implementation. For implementation.
See also:
isSystemObjectName().

Implements KexiDB::Driver.

Definition at line 106 of file mysqldriver.cpp.

QString MySqlDriver::escapeString ( const QString &  str  )  const [virtual]

Escape a string for use as a value.

Todo:
support more characters, like %, _

Todo:
move new_string to Driver::m_new_string or so...

Implements KexiDB::Driver.

Definition at line 115 of file mysqldriver.cpp.

QCString MySqlDriver::escapeString ( const QCString &  str  )  const [virtual]

This is overloaded version of escapeString( const QString& str ) to be implemented in the same way.

Implements KexiDB::Driver.

Definition at line 188 of file mysqldriver.cpp.

QString MySqlDriver::escapeBLOB ( const QByteArray &  array  )  const [virtual]

Escape BLOB value array.

Implements KexiDB::Driver.

Definition at line 183 of file mysqldriver.cpp.

QString MySqlDriver::drv_escapeIdentifier ( const QString &  str  )  const [protected, virtual]

Add back-ticks to an identifier, and replace any back-ticks within the name with single quotes.

Implements KexiDB::Driver.

Definition at line 203 of file mysqldriver.cpp.

QCString MySqlDriver::drv_escapeIdentifier ( const QCString &  str  )  const [protected, virtual]

This is overloaded version of drv_escapeIdentifier( const QString& str ) to be implemented in the same way.

Implements KexiDB::Driver.

Definition at line 207 of file mysqldriver.cpp.

KexiDB::Connection * MySqlDriver::drv_createConnection ( ConnectionData conn_data  )  [protected, virtual]

For reimplemenation: creates and returns connection object with additional structures specific for a given driver. Connection object should inherit Connection and have a destructor that descructs all allocated driver-dependent connection structures.

Implements KexiDB::Driver.

Definition at line 101 of file mysqldriver.cpp.

bool MySqlDriver::drv_isSystemFieldName ( const QString &  n  )  const [protected, virtual]

Returns:
true if n is a system field's name, build-in system field that cannot be used or created by a user, and in most cases user even shouldn't see this. The list is specific for a given driver implementation. For implementation.

Implements KexiDB::Driver.

Definition at line 111 of file mysqldriver.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys