KDb

SybaseDriver.h
1/* This file is part of the KDE project
2Copyright (C) 2007 Sharan Rao <sharanrao@gmail.com>
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU Library General Public
6License as published by the Free Software Foundation; either
7version 2 of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12Library General Public License for more details.
13
14You should have received a copy of the GNU Library General Public License
15along with this program; see the file COPYING. If not, write to
16the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef SYBASEDB_H
21#define SYBASEDB_H
22
23#include "KDbDriver.h"
24
25//! Sybase database driver.
26class SybaseDriver : public KDbDriver
27{
29
30public:
31 /*!
32 * Constructor sets database features and
33 * maps the types in KDbField::Type to the Sybase types.
34 */
35 SybaseDriver(QObject *parent, const QVariantList &args);
36
37 virtual ~SybaseDriver();
38
39 virtual bool isSystemDatabaseName(const QString &n) const;
40
41 //! Escape a string for use as a value
42 virtual KDbEscapedString escapeString(const QString& str) const;
43 virtual KDbEscapedString escapeString(const QByteArray& str) const;
44
45 //! Escape BLOB value \a array
46 virtual KDbEscapedString escapeBLOB(const QByteArray& array) const;
47
48protected:
49 virtual QByteArray drv_escapeIdentifier(const QString& str) const;
50 virtual QByteArray drv_escapeIdentifier(const QByteArray& str) const;
52 const KDbConnectionOptions &options);
53 virtual bool drv_isSystemFieldName(const QString& n) const;
54 virtual KDbEscapedString addLimitTo1(const QString& sql, bool add = true);
55
56private:
57 static const char *m_keywords[];
58 QSet<QByteArray> m_systemDatabases;
59};
60
61#endif
Database specific connection data, e.g. host, port.
Generic options for a single connection. The options are accessible using key/value pairs....
Provides database connection, allowing queries and data modification.
Database driver's abstraction.
Definition KDbDriver.h:50
Specialized string for escaping.
Sybase database driver.
virtual KDbEscapedString escapeString(const QString &str) const
Escape a string for use as a value.
virtual bool isSystemDatabaseName(const QString &n) const
SybaseDriver(QObject *parent, const QVariantList &args)
virtual KDbConnection * drv_createConnection(const KDbConnectionData &connData, const KDbConnectionOptions &options)
virtual QByteArray drv_escapeIdentifier(const QString &str) const
virtual bool drv_isSystemFieldName(const QString &n) const
virtual KDbEscapedString escapeBLOB(const QByteArray &array) const
Escape BLOB value array.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.