#include <pqxxdriver.h>
Public Member Functions | |
| pqxxSqlDriver (TQObject *parent, const char *name, const TQStringList &args=TQStringList()) | |
| virtual bool | isSystemObjectName (const TQString &n) const |
| virtual bool | isSystemDatabaseName (const TQString &n) const |
| virtual TQString | escapeString (const TQString &str) const |
| virtual TQCString | escapeString (const TQCString &str) const |
| virtual TQString | sqlTypeName (int id_t, int p=0) const |
| virtual TQString | escapeBLOB (const TQByteArray &array) const |
| virtual TQString | valueToSQL (uint ftype, const TQVariant &v) const |
| Public Member Functions inherited from KexiDB::Driver | |
| Connection * | createConnection (ConnectionData &conn_data, int options=0) |
| const TQPtrList< Connection > | connectionsList () const |
| TQString | fileDBDriverMimeType () const |
| const KService * | service () const |
| bool | isFileDriver () const |
| bool | isSystemFieldName (const TQString &n) const |
| int | features () const |
| bool | transactionsSupported () const |
| AdminTools & | adminTools () const |
| virtual bool | isValid () |
| virtual DatabaseVersionInfo | version () const =0 |
| TQString | valueToSQL (const TQString &ftype, const TQVariant &v) const |
| TQString | valueToSQL (const Field *field, const TQVariant &v) const |
| virtual TQString | dateTimeToSQL (const TQDateTime &v) const |
| TQString | escapeIdentifier (const TQString &str, int options=EscapeDriver|EscapeAsNecessary) const |
| TQCString | escapeIdentifier (const TQCString &str, int options=EscapeDriver|EscapeAsNecessary) const |
| TQVariant | propertyValue (const TQCString &propName) const |
| TQString | propertyCaption (const TQCString &propName) const |
| TQValueList< TQCString > | propertyNames () const |
| Public Member Functions inherited from KexiDB::Object | |
| bool | error () const |
| const TQString & | errorMsg () const |
| int | errorNum () const |
| int | previousServerResult () const |
| TQString | previousServerResultName () const |
| void | debugError () |
| virtual void | clearError () |
| virtual TQString | serverErrorMsg () |
| virtual int | serverResult () |
| virtual TQString | serverResultName () |
| TQString | msgTitle () const |
| const TQString | recentSQLString () const |
Protected Member Functions | |
| virtual TQString | drv_escapeIdentifier (const TQString &str) const |
| virtual TQCString | drv_escapeIdentifier (const TQCString &str) const |
| virtual Connection * | drv_createConnection (ConnectionData &conn_data) |
| virtual bool | drv_isSystemFieldName (const TQString &n) const |
| Protected Member Functions inherited from KexiDB::Driver | |
| Driver (TQObject *parent, const char *name, const TQStringList &args=TQStringList()) | |
| virtual AdminTools * | drv_createAdminTools () const |
| Connection * | removeConnection (Connection *conn) |
| void | initSQLKeywords (int hashSize=17) |
| Protected Member Functions inherited from KexiDB::Object | |
| Object (MessageHandler *handler=0) | |
| virtual void | setError (int code=ERR_OTHER, const TQString &msg=TQString()) |
| virtual void | setError (const TQString &msg) |
| virtual void | setError (const TQString &title, const TQString &msg) |
| void | setError (KexiDB::Object *obj, const TQString &prependMessage=TQString()) |
| virtual void | setError (KexiDB::Object *obj, int code, const TQString &prependMessage=TQString()) |
| virtual int | askQuestion (const TQString &message, KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult, const KGuiItem &buttonYes=KStdGuiItem::yes(), const KGuiItem &buttonNo=KStdGuiItem::no(), const TQString &dontShowAskAgainName=TQString(), int options=KMessageBox::Notify, MessageHandler *msgHandler=0) |
| virtual void | drv_clearServerResult () |
Additional Inherited Members | |
| Public Types inherited from KexiDB::Driver | |
| enum | Features { NoFeatures = 0 , SingleTransactions = 1 , MultipleTransactions = 2 , NestedTransactions = 4 , CursorForward = 8 , CursorBackward = (CursorForward+16) , CompactingDatabaseSupported = 32 , IgnoreTransactions = 1024 } |
| enum | CreateConnectionOptions { ReadOnlyConnection = 1 } |
| enum | EscapeType { EscapeDriver = 0x01 , EscapeKexi = 0x02 } |
| enum | EscapePolicy { EscapeAsNecessary = 0x04 , EscapeAlways = 0x08 } |
| typedef TQMap< TQString, Info > | InfoMap |
| Static Public Member Functions inherited from KexiDB::Driver | |
| static TQString | defaultFileBasedDriverMimeType () |
| static TQString | defaultFileBasedDriverName () |
| static bool | isKexiDBSystemObjectName (const TQString &n) |
| static TQString | defaultSQLTypeName (int id_t) |
| Protected Attributes inherited from KexiDB::Driver | |
| DriverBehaviour * | beh |
| DriverPrivate * | d |
| Protected Attributes inherited from KexiDB::Object | |
| TQString | m_sql |
| TQString | m_errorSql |
| int | m_serverResult |
| TQString | m_serverResultName |
| TQString | m_serverErrorMsg |
| TQString | m_errMsg |
Detailed Description
PostgreSQL database driver.
Definition at line 34 of file pqxxdriver.h.
Constructor & Destructor Documentation
◆ pqxxSqlDriver()
| pqxxSqlDriver::pqxxSqlDriver | ( | TQObject * | parent, |
| const char * | name, | ||
| const TQStringList & | args = TQStringList() ) |
- Todo
- enable this when kexidb supports multiple: d->features = MultipleTransactions | CursorForward | CursorBackward;
Definition at line 36 of file pqxxdriver.cpp.
◆ ~pqxxSqlDriver()
| pqxxSqlDriver::~pqxxSqlDriver | ( | ) |
Definition at line 98 of file pqxxdriver.cpp.
Member Function Documentation
◆ drv_createConnection()
|
protectedvirtual |
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.
◆ drv_escapeIdentifier() [1/2]
|
protectedvirtual |
This is overloaded version of drv_escapeIdentifier( const TQString& str ) to be implemented in the same way.
Implements KexiDB::Driver.
Definition at line 162 of file pqxxdriver.cpp.
◆ drv_escapeIdentifier() [2/2]
|
protectedvirtual |
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 156 of file pqxxdriver.cpp.
◆ drv_isSystemFieldName()
|
protectedvirtual |
- 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.
◆ escapeBLOB()
|
virtual |
◆ escapeString() [1/2]
|
virtual |
This is overloaded version of escapeString( const TQString& str ) to be implemented in the same way.
Implements KexiDB::Driver.
Definition at line 145 of file pqxxdriver.cpp.
◆ escapeString() [2/2]
|
virtual |
Escape a string for use as a value.
Implements KexiDB::Driver.
Definition at line 134 of file pqxxdriver.cpp.
◆ isSystemDatabaseName()
|
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.
◆ isSystemObjectName()
|
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.
◆ sqlTypeName()
|
virtual |
SQL-implementation-dependent name of given type
Reimplemented from KexiDB::Driver.
Definition at line 75 of file pqxxdriver.cpp.
◆ valueToSQL()
|
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 173 of file pqxxdriver.cpp.
The documentation for this class was generated from the following files:
