kexidbdriver.h
1/***************************************************************************
2 * kexidbdriver.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_KEXIDB_KEXIDBDRIVER_H
21#define KROSS_KEXIDB_KEXIDBDRIVER_H
22
23#include <tqstring.h>
24#include <tqvaluelist.h>
25//#include <tqguardedptr.h>
26
27#include <api/object.h>
28#include <api/variant.h>
29#include <api/list.h>
30#include <api/class.h>
31
32#include <kexidb/driver.h>
33
34#include "kexidbconnection.h"
35#include "kexidbconnectiondata.h"
36
37namespace Kross { namespace KexiDB {
38
65 class KexiDBDriver : public Kross::Api::Class<KexiDBDriver>
66 {
67 public:
69 virtual ~KexiDBDriver();
70 virtual const TQString getClassName() const;
71
72 private:
73
75 bool isValid();
77 int versionMajor();
79 int versionMinor();
82 TQString escapeString(const TQString& s);
84 bool isFileDriver();
87 TQString fileDBDriverMimeType();
90 bool isSystemObjectName(const TQString& name);
93 bool isSystemDatabaseName(const TQString& name);
96 bool isSystemFieldName(const TQString& name);
101 TQString valueToSQL(const TQString& fieldtype, const TQVariant& value);
103 KexiDBConnection* createConnection(KexiDBConnectionData* data);
105 TQPtrList< ::KexiDB::Connection > connectionsList();
106
107 private:
108 ::KexiDB::Driver* m_driver;
109 };
110
111}}
112
113#endif
114
Generic database abstraction.
Definition driver.h:67
A KexiDBConnectionData is used to store the details needed for a connection with a database.
A connection to a database.
Drivers are the implementations Kexi uses to access the driver-backends.
High-level database connectivity library with database backend drivers.