pqxxdriver.h
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2003 Adam Pigg <adam@piggz.co.uk> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this program; see the file COPYING. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KEXIDB_DRIVER_PQXX_H 00021 #define KEXIDB_DRIVER_PQXX_H 00022 00023 #include <qstringlist.h> 00024 00025 #include <kexidb/driver.h> 00026 00027 namespace KexiDB 00028 { 00029 00030 class Connection; 00031 class DriverManager; 00032 00034 class pqxxSqlDriver : public Driver 00035 { 00036 Q_OBJECT 00037 KEXIDB_DRIVER 00038 00039 public: 00040 pqxxSqlDriver( QObject *parent, const char *name, const QStringList &args = QStringList() ); 00041 ~pqxxSqlDriver(); 00042 00043 virtual bool isSystemObjectName( const QString& n )const; 00044 virtual bool isSystemDatabaseName( const QString& n )const; 00045 00047 virtual QString escapeString( const QString& str) const; 00048 virtual QCString escapeString( const QCString& str) const; 00049 virtual QString sqlTypeName(int id_t, int p=0) const; 00050 00052 virtual QString escapeBLOB(const QByteArray& array) const; 00053 00057 virtual QString valueToSQL( uint ftype, const QVariant& v ) const; 00058 00059 protected: 00060 virtual QString drv_escapeIdentifier( const QString& str) const; 00061 virtual QCString drv_escapeIdentifier( const QCString& str) const; 00062 virtual Connection *drv_createConnection( ConnectionData &conn_data ); 00063 virtual bool drv_isSystemFieldName( const QString& n )const; 00064 00065 private: 00066 static const char *keywords[]; 00067 }; 00068 00069 }; 00070 00071 #endif
