author | kergoth <kergoth> | 2002-11-01 00:10:42 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-11-01 00:10:42 (UTC) |
commit | 5042e3cf0d3514552769e441f5aad590c8eaf967 (patch) (unidiff) | |
tree | 4a5ea45f3519d981a172ab5275bf38c6fa778dec /qmake/include/private/qsqlextension_p.h | |
parent | 108c1c753e74e989cc13923086996791428c9af4 (diff) | |
download | opie-5042e3cf0d3514552769e441f5aad590c8eaf967.zip opie-5042e3cf0d3514552769e441f5aad590c8eaf967.tar.gz opie-5042e3cf0d3514552769e441f5aad590c8eaf967.tar.bz2 |
Adding qmake in preperation for new build system
Diffstat (limited to 'qmake/include/private/qsqlextension_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qsqlextension_p.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/qmake/include/private/qsqlextension_p.h b/qmake/include/private/qsqlextension_p.h new file mode 100644 index 0000000..597b266 --- a/dev/null +++ b/qmake/include/private/qsqlextension_p.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /**************************************************************************** | ||
2 | ** | ||
3 | ** Definition of the QSqlExtension class | ||
4 | ** | ||
5 | ** Created : 2002-06-03 | ||
6 | ** | ||
7 | ** Copyright (C) 2002 Trolltech AS. All rights reserved. | ||
8 | ** | ||
9 | ** This file is part of the sql module of the Qt GUI Toolkit. | ||
10 | ** | ||
11 | ** This file may be distributed under the terms of the Q Public License | ||
12 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
13 | ** LICENSE.QPL included in the packaging of this file. | ||
14 | ** | ||
15 | ** This file may be distributed and/or modified under the terms of the | ||
16 | ** GNU General Public License version 2 as published by the Free Software | ||
17 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
18 | ** packaging of this file. | ||
19 | ** | ||
20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | ||
21 | ** file in accordance with the Qt Commercial License Agreement provided | ||
22 | ** with the Software. | ||
23 | ** | ||
24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
26 | ** | ||
27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
28 | ** information about Qt Commercial License Agreements. | ||
29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
31 | ** | ||
32 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
33 | ** not clear to you. | ||
34 | ** | ||
35 | **********************************************************************/ | ||
36 | |||
37 | #ifndef QSQLEXTENSION_P_H | ||
38 | #define QSQLEXTENSION_P_H | ||
39 | |||
40 | // | ||
41 | // W A R N I N G | ||
42 | // ------------- | ||
43 | // | ||
44 | // This file is not part of the Qt API. It exists for the convenience | ||
45 | // of other Qt classes. This header file may change from version to | ||
46 | // version without notice, or even be removed. | ||
47 | // | ||
48 | // We mean it. | ||
49 | // | ||
50 | // | ||
51 | |||
52 | #ifndef QT_H | ||
53 | #include "qmap.h" | ||
54 | #include "qstring.h" | ||
55 | #include "qvariant.h" | ||
56 | #endif // QT_H | ||
57 | |||
58 | #ifndef QT_NO_SQL | ||
59 | |||
60 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) | ||
61 | #define QM_EXPORT_SQL | ||
62 | #else | ||
63 | #define QM_EXPORT_SQL Q_EXPORT | ||
64 | #endif | ||
65 | |||
66 | #if defined(Q_TEMPLATEDLL) | ||
67 | Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<QString,QVariant>; | ||
68 | Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<int,QString>; | ||
69 | #endif | ||
70 | |||
71 | class QM_EXPORT_SQL QSqlExtension { | ||
72 | public: | ||
73 | QSqlExtension(); | ||
74 | virtual ~QSqlExtension(); | ||
75 | virtual bool prepare( const QString& query ); | ||
76 | virtual bool exec(); | ||
77 | virtual void bindValue( const QString& holder, const QVariant& value ); | ||
78 | virtual void bindValue( int pos, const QVariant& value ); | ||
79 | virtual void addBindValue( const QVariant& value ); | ||
80 | void clearValues(); | ||
81 | void clearIndex(); | ||
82 | |||
83 | enum BindMethod { BindByPosition, BindByName }; | ||
84 | BindMethod bindMethod(); | ||
85 | BindMethod bindm; | ||
86 | int bindCount; | ||
87 | |||
88 | QMap<int, QString> index; | ||
89 | QMap<QString, QVariant> values; | ||
90 | }; | ||
91 | |||
92 | class QM_EXPORT_SQL QSqlDriverExtension | ||
93 | { | ||
94 | public: | ||
95 | QSqlDriverExtension(); | ||
96 | virtual ~QSqlDriverExtension(); | ||
97 | virtual bool isOpen() const = 0; | ||
98 | }; | ||
99 | |||
100 | #endif | ||
101 | #endif | ||