summaryrefslogtreecommitdiff
path: root/libopie2/opiedb/osqlquery.h
Unidiff
Diffstat (limited to 'libopie2/opiedb/osqlquery.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqlquery.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlquery.h b/libopie2/opiedb/osqlquery.h
index 63c26b0..0265d2b 100644
--- a/libopie2/opiedb/osqlquery.h
+++ b/libopie2/opiedb/osqlquery.h
@@ -1,21 +1,24 @@
1 1
2#ifndef OSQL_QUERY_H 2#ifndef OSQL_QUERY_H
3#define OSQL_QUERY_H 3#define OSQL_QUERY_H
4 4
5#include <qmap.h> 5#include <qmap.h>
6#include <qvaluelist.h> 6#include <qvaluelist.h>
7#include <qstring.h> 7#include <qstring.h>
8 8
9 9
10namespace Opie {
11namespace DB {
12
10/** I'm not happy with them 13/** I'm not happy with them
11class OSQLQueryOrder { 14class OSQLQueryOrder {
12public: 15public:
13 typedef QValueList<OSQLQueryOrder> ValueList; 16 typedef QValueList<OSQLQueryOrder> ValueList;
14 OSQLQueryOrder(const QString& table = QString::null ); 17 OSQLQueryOrder(const QString& table = QString::null );
15 OSQLQueryOrder( const OSQLQueryOrder& ); 18 OSQLQueryOrder( const OSQLQueryOrder& );
16 ~OSQLQueryOrder(); 19 ~OSQLQueryOrder();
17 void setOrderFields( const QStringList& list ); 20 void setOrderFields( const QStringList& list );
18 void setValue( const QString& fieldName, const QString& Value ); 21 void setValue( const QString& fieldName, const QString& Value );
19 void setValues( const QMap<QString, QString>& ); 22 void setValues( const QMap<QString, QString>& );
20 QMap<QString, QString> orders() const; 23 QMap<QString, QString> orders() const;
21 QString orderStatement()const; 24 QString orderStatement()const;
@@ -38,24 +41,27 @@ private:
38 int m_vergleich; 41 int m_vergleich;
39 const QString& m_left; 42 const QString& m_left;
40 const QString& m_right; 43 const QString& m_right;
41 44
42}; 45};
43*/ 46*/
44class OSQLQuery { 47class OSQLQuery {
45public: 48public:
46 OSQLQuery(); 49 OSQLQuery();
47 virtual ~OSQLQuery(); 50 virtual ~OSQLQuery();
48 51
49 virtual QString query()const = 0; 52 virtual QString query()const = 0;
53private:
54 class Private;
55 Private *d;
50}; 56};
51 57
52class OSQLRawQuery : public OSQLQuery { 58class OSQLRawQuery : public OSQLQuery {
53public: 59public:
54 OSQLRawQuery( const QString& query ); 60 OSQLRawQuery( const QString& query );
55 ~OSQLRawQuery(); 61 ~OSQLRawQuery();
56 QString query() const; 62 QString query() const;
57private: 63private:
58 class OSQLRawQueryPrivate; 64 class OSQLRawQueryPrivate;
59 OSQLRawQueryPrivate* d; 65 OSQLRawQueryPrivate* d;
60 QString m_query; 66 QString m_query;
61 67
@@ -110,13 +116,15 @@ public:
110 OSQLUpdateQuery( const QString& table ); 116 OSQLUpdateQuery( const QString& table );
111 ~OSQLUpdateQuery(); 117 ~OSQLUpdateQuery();
112 void setWhere( const OSQLWhere& ); 118 void setWhere( const OSQLWhere& );
113 void setWheres( const OSQLWhere::ValueList& ); 119 void setWheres( const OSQLWhere::ValueList& );
114 */ 120 */
115 /* replaces all previous set Values */ 121 /* replaces all previous set Values */
116 /* 122 /*
117 void setValue( const QString& field, const QString& value ); 123 void setValue( const QString& field, const QString& value );
118 void setValue( const QMap<QString, QString> &fields ); 124 void setValue( const QMap<QString, QString> &fields );
119 QString query() const; 125 QString query() const;
120}; 126};
121*/ 127*/
128}
129}
122#endif 130#endif