File indexing completed on 2024-05-05 08:51:23
0001 /* This file is part of the KDE project 0002 Copyright (C) 2008 Sharan Rao <sharanrao@gmail.com> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this program; see the file COPYING. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KDB_DRIVER_XBASEDRIVER_H 0021 #define KDB_DRIVER_XBASEDRIVER_H 0022 0023 #include "KDbDriver.h" 0024 0025 class xBaseDriverPrivate; 0026 0027 class xBaseDriver : public KDbDriver 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 xBaseDriver(QObject *parent, const QVariantList &args); 0033 0034 virtual ~xBaseDriver(); 0035 0036 /*! \return true if \a n is a system object name; 0037 */ 0038 virtual bool isSystemObjectName( const QString& n ) const; 0039 0040 /*! \return false for this driver. */ 0041 virtual bool isSystemDatabaseName(const QString &n) const; 0042 0043 //! Escape a string for use as a value 0044 virtual KDbEscapedString escapeString(const QString& str) const; 0045 virtual KDbEscapedString escapeString(const QByteArray& str) const; 0046 0047 //! Escape BLOB value \a array 0048 virtual KDbEscapedString escapeBLOB(const QByteArray& array) const; 0049 0050 protected: 0051 virtual QByteArray drv_escapeIdentifier( const QString& str) const; 0052 virtual QByteArray drv_escapeIdentifier( const QByteArray& str) const; 0053 virtual KDbConnection *drv_createConnection(const KDbConnectionData& connData, 0054 const KDbConnectionOptions &options); 0055 virtual bool drv_isSystemFieldName( const QString& n ) const; 0056 0057 private: 0058 xBaseDriverPrivate* dp; 0059 static const char *keywords[]; 0060 }; 0061 0062 #endif // KDB_DRIVER_XBASEDRIVER_H