driver_p.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXIDB_DRIVER_P_H
00021 #define KEXIDB_DRIVER_P_H
00022
00023 #ifndef __KEXIDB__
00024 # error "Do not include: this is KexiDB internal file"
00025 #endif
00026
00027 #include <qstring.h>
00028 #include <qvariant.h>
00029 #include <qmap.h>
00030 #include <qptrdict.h>
00031 #include <qasciidict.h>
00032 #include <qvaluevector.h>
00033 #include <kgenericfactory.h>
00034
00035 #include "connection.h"
00036 #include "admin.h"
00037
00038 class KService;
00039
00040 namespace KexiDB {
00041
00047 class KEXI_DB_EXPORT DriverBehaviour
00048 {
00049 public:
00050 DriverBehaviour();
00051
00053 QString UNSIGNED_TYPE_KEYWORD;
00054
00057 QString AUTO_INCREMENT_FIELD_OPTION;
00058
00061 QString AUTO_INCREMENT_PK_FIELD_OPTION;
00062
00065 QString AUTO_INCREMENT_TYPE;
00066
00071 bool SPECIAL_AUTO_INCREMENT_DEF : 1;
00072
00075 bool AUTO_INCREMENT_REQUIRES_PK : 1;
00076
00084 QString ROW_ID_FIELD_NAME;
00085
00102 bool ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE : 1;
00103
00112 QString ALWAYS_AVAILABLE_DATABASE_NAME;
00113
00117 QChar QUOTATION_MARKS_FOR_IDENTIFIER;
00118
00125 bool USING_DATABASE_REQUIRED_TO_CONNECT : 1;
00126
00130 bool _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;
00131
00134 bool SELECT_1_SUBQUERY_SUPPORTED : 1;
00135
00138 const char** SQL_KEYWORDS;
00139 };
00140
00142 class DriverPrivate
00143 {
00144 public:
00145 DriverPrivate();
00146 virtual ~DriverPrivate();
00147
00148 QPtrDict<Connection> connections;
00149
00150
00151
00152
00153
00154
00158 QString fileDBDriverMimeType;
00159
00161 KService *service;
00162
00164 bool isFileDriver : 1;
00165
00169 bool isDBOpenedAfterCreate : 1;
00170
00175
00176
00180
00181
00186 int features;
00187
00189 QValueVector<QString> typeNames;
00190
00194 QMap<QCString,QVariant> properties;
00195
00199 QMap<QCString,QString> propertyCaptions;
00200
00202 AdminTools *adminTools;
00203
00210 static QAsciiDict<bool>* kexiSQLDict;
00211 static const char *kexiSQLKeywords[];
00212
00222 QAsciiDict<bool>* driverSQLDict;
00223
00225 void initKexiKeywords();
00229 void initDriverKeywords(const char* keywords[], int hashSize);
00230
00231 protected:
00234 void initInternalProperties();
00235
00236 private:
00237 void initKeywords(const char* keywords[], QAsciiDict<bool>& dict);
00238
00239 friend class DriverManagerInternal;
00240 };
00241
00242
00243 #define BLOB_ESCAPING_TYPE_USE_X 0
00244 #define BLOB_ESCAPING_TYPE_USE_0x 1
00245 #define BLOB_ESCAPING_TYPE_USE_OCTAL 2
00246
00247 class KEXI_DB_EXPORT AdminTools::Private
00248 {
00249 public:
00250 Private();
00251 ~Private();
00252 };
00253
00254 }
00255
00258 #define KEXIDB_DRIVER_INFO( class_name, internal_name ) \
00259 DatabaseVersionInfo class_name::version() const { return KEXIDB_VERSION; } \
00260 K_EXPORT_COMPONENT_FACTORY(kexidb_ ## internal_name ## driver, KGenericFactory<KexiDB::class_name>( "kexidb_" #internal_name ))
00261
00262 #endif
This file is part of the documentation for Kexi 2.0 alpha.