mysqldriver.h
1/* This file is part of the KDE project
2Copyright (C) 2002 Lucijan Busch <lucijan@gmx.at>
3Daniel Molkentin <molkentin@kde.org>
4Copyright (C) 2003 Joseph Wenninger<jowenn@kde.org>
5
6This program is free software; you can redistribute it and/or
7modify it under the terms of the GNU Library General Public
8License as published by the Free Software Foundation; either
9version 2 of the License, or (at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14Library General Public License for more details.
15
16You should have received a copy of the GNU Library General Public License
17along with this program; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20*/
21
22#ifndef MYSQLDB_H
23#define MYSQLDB_H
24
25#include <kexidb/driver.h>
26
27namespace KexiDB {
28
30class MySqlDriver : public Driver
31{
32 TQ_OBJECT
33
34 KEXIDB_DRIVER
35
36 public:
37 MySqlDriver(TQObject *parent, const char *name, const TQStringList &args=TQStringList());
38 virtual ~MySqlDriver();
39
40 virtual bool isSystemDatabaseName( const TQString &n ) const;
41
43 virtual TQString escapeString(const TQString& str) const;
44 virtual TQCString escapeString(const TQCString& str) const;
45
47 virtual TQString escapeBLOB(const TQByteArray& array) const;
48
49 protected:
50 virtual TQString drv_escapeIdentifier( const TQString& str) const;
51 virtual TQCString drv_escapeIdentifier( const TQCString& str) const;
52 virtual Connection *drv_createConnection( ConnectionData &conn_data );
53 virtual bool drv_isSystemFieldName( const TQString& n ) const;
54
55 private:
56 static const char *keywords[];
57};
58}
59
60#endif
Database specific connection data, e.g. host, port.
Provides database connection, allowing queries and data modification.
Definition connection.h:62
Generic database abstraction.
Definition driver.h:67
MySQL database driver.
Definition mysqldriver.h:31
virtual TQString escapeBLOB(const TQByteArray &array) const
Escape BLOB value array.
virtual Connection * drv_createConnection(ConnectionData &conn_data)
virtual bool isSystemDatabaseName(const TQString &n) const
virtual TQString drv_escapeIdentifier(const TQString &str) const
virtual TQString escapeString(const TQString &str) const
Escape a string for use as a value.
virtual bool drv_isSystemFieldName(const TQString &n) const
High-level database connectivity library with database backend drivers.