Kexi API Documentation (2.0 alpha)

KexiDB::pqxxSqlDriver Class Reference

#include <pqxxdriver.h>

Inheritance diagram for KexiDB::pqxxSqlDriver:

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

Detailed Description

PostgreSQL database driver.

Definition at line 34 of file pqxxdriver.h.

Public Member Functions

 pqxxSqlDriver (QObject *parent, const char *name, const QStringList &args=QStringList())
 ~pqxxSqlDriver ()
virtual bool isSystemObjectName (const QString &n) const
virtual bool isSystemDatabaseName (const QString &n) const
virtual QString escapeString (const QString &str) const
 Escape a string for use as a value.
virtual QCString escapeString (const QCString &str) const
virtual QString sqlTypeName (int id_t, int p=0) const
virtual QString escapeBLOB (const QByteArray &array) const
 Escape BLOB value array.
virtual QString valueToSQL (uint ftype, const QVariant &v) 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

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

Todo:
enable this when kexidb supports multiple: d->features = MultipleTransactions | CursorForward | CursorBackward;

Definition at line 36 of file pqxxdriver.cpp.

References KexiDB::Field::BigInteger, KexiDB::Field::BLOB, KexiDB::Field::Boolean, KexiDB::Field::Byte, KexiDB::Field::Date, KexiDB::Field::DateTime, KexiDB::Field::Double, KexiDB::Field::Float, KexiDB::Field::Integer, KexiDB::Field::LongText, KexiDB::Field::ShortInteger, KexiDB::Field::Text, and KexiDB::Field::Time.

pqxxSqlDriver::~pqxxSqlDriver  ) 
 

Definition at line 98 of file pqxxdriver.cpp.


Member Function Documentation

KexiDB::Connection * pqxxSqlDriver::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 106 of file pqxxdriver.cpp.

QCString pqxxSqlDriver::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 154 of file pqxxdriver.cpp.

QString pqxxSqlDriver::drv_escapeIdentifier const QString str  )  const [protected, virtual]
 

Driver-specific SQL string escaping. This method is used by escapeIdentifier(). Implement escaping for any character like " or ' as your database engine requires. Do not append or prepend any quotation marks characters - it is automatically done by escapeIdentifier() using DriverBehaviour::QUOTATION_MARKS_FOR_IDENTIFIER.

Implements KexiDB::Driver.

Definition at line 148 of file pqxxdriver.cpp.

bool pqxxSqlDriver::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 120 of file pqxxdriver.cpp.

QString pqxxSqlDriver::escapeBLOB const QByteArray &  array  )  const [virtual]
 

Escape BLOB value array.

Implements KexiDB::Driver.

Definition at line 160 of file pqxxdriver.cpp.

References KexiDB::BLOBEscapeOctal, and KexiDB::escapeBLOB().

QCString pqxxSqlDriver::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 141 of file pqxxdriver.cpp.

QString pqxxSqlDriver::escapeString const QString str  )  const [virtual]
 

Escape a string for use as a value.

Implements KexiDB::Driver.

Definition at line 134 of file pqxxdriver.cpp.

bool pqxxSqlDriver::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 127 of file pqxxdriver.cpp.

bool pqxxSqlDriver::isSystemObjectName const QString n  )  const [virtual]
 

Returns:
true if n is a system object's name, eg. name of build-in system table 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. By default calls Driver::isKexiDBSystemObjectName() static method. Note for driver developers: Also call Driver::isSystemObjectName() from your reimplementation.
See also:
isSystemFieldName().

Reimplemented from KexiDB::Driver.

Definition at line 113 of file pqxxdriver.cpp.

References KexiDB::Driver::isSystemObjectName().

QString pqxxSqlDriver::sqlTypeName int  id_t,
int  p = 0
const [virtual]
 

SQL-implementation-dependent name of given type

Reimplemented from KexiDB::Driver.

Definition at line 75 of file pqxxdriver.cpp.

References KexiDB::Driver::d, KexiDB::Field::Double, KexiDB::Field::Float, KexiDB::Field::Null, and KexiDB::DriverPrivate::typeNames.

QString pqxxSqlDriver::valueToSQL uint  ftype,
const QVariant &  v
const [virtual]
 

Escapes and converts value v (for type ftype) to string representation required by SQL commands. Reimplemented for boolean type only to use SQL compliant TRUE or FALSE

Reimplemented from KexiDB::Driver.

Definition at line 165 of file pqxxdriver.cpp.

References KexiDB::Field::Boolean, and KexiDB::Driver::valueToSQL().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:42 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003