summaryrefslogtreecommitdiff
path: root/libopie2/opiedb/osqldriver.h
Unidiff
Diffstat (limited to 'libopie2/opiedb/osqldriver.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiedb/osqldriver.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqldriver.h b/libopie2/opiedb/osqldriver.h
index 68d8ee6..492b8dd 100644
--- a/libopie2/opiedb/osqldriver.h
+++ b/libopie2/opiedb/osqldriver.h
@@ -1,33 +1,37 @@
1#ifndef OSQL_DRIVER_H 1#ifndef OSQL_DRIVER_H
2#define OSQL_DRIVER_H 2#define OSQL_DRIVER_H
3 3
4#include <qobject.h> 4#include <qobject.h>
5#include <qstring.h> 5#include <qstring.h>
6 6
7#include "osqltable.h" 7#include "osqltable.h"
8 8
9class QLibrary; 9class QLibrary;
10
11namespace Opie {
12namespace DB {
13
10class OSQLResult; 14class OSQLResult;
11class OSQLQuery; 15class OSQLQuery;
12class OSQLError; 16class OSQLError;
13 17
14/** 18/**
15 * A OSQLDriver implements the communication with 19 * A OSQLDriver implements the communication with
16 * a database. 20 * a database.
17 * After you queried and loaded a driver you can 21 * After you queried and loaded a driver you can
18 * set some informations and finally try to open 22 * set some informations and finally try to open
19 * the database 23 * the database
20 * 24 *
21 */ 25 */
22class OSQLDriver : public QObject{ 26class OSQLDriver : public QObject{
23 Q_OBJECT 27 Q_OBJECT
24public: 28public:
25 enum Capabilities { RowID=0 }; 29 enum Capabilities { RowID=0 };
26 /** 30 /**
27 * OSQLDriver constructor. It takes the QLibrary 31 * OSQLDriver constructor. It takes the QLibrary
28 * as parent. 32 * as parent.
29 * 33 *
30 */ 34 */
31 OSQLDriver( QLibrary* lib=0 ); 35 OSQLDriver( QLibrary* lib=0 );
32 36
33 virtual ~OSQLDriver(); 37 virtual ~OSQLDriver();
@@ -63,25 +67,28 @@ public:
63 virtual bool close() = 0; 67 virtual bool close() = 0;
64 68
65 virtual OSQLError lastError() = 0; 69 virtual OSQLError lastError() = 0;
66 70
67 /** 71 /**
68 * Query the Database with a OSQLQuery 72 * Query the Database with a OSQLQuery
69 * OSQLResult holds the result 73 * OSQLResult holds the result
70 */ 74 */
71 virtual OSQLResult query( OSQLQuery* ) = 0; 75 virtual OSQLResult query( OSQLQuery* ) = 0;
72 76
73 /** 77 /**
74 * Get a list of tables 78 * Get a list of tables
75 */ 79 */
76 virtual OSQLTable::ValueList tables() const = 0l; 80 virtual OSQLTable::ValueList tables() const = 0l;
77 virtual bool sync(); 81 virtual bool sync();
78 82
79 83
80private: 84private:
81 QLibrary* m_lib; 85 QLibrary* m_lib;
82 class OSQLDriverPrivate; 86 class OSQLDriverPrivate;
83 OSQLDriverPrivate *d; 87 OSQLDriverPrivate *d;
84 88
85}; 89};
86 90
91}
92}
93
87#endif 94#endif