summaryrefslogtreecommitdiff
path: root/libopie2/opiedb/osqlitedriver.h
authormickeyl <mickeyl>2003-08-10 15:40:31 (UTC)
committer mickeyl <mickeyl>2003-08-10 15:40:31 (UTC)
commit616e919ff6aea6a30e18edb37128c229e806beae (patch) (side-by-side diff)
tree31e36f7d631b3dc55460aefd05bc6a455e73ace1 /libopie2/opiedb/osqlitedriver.h
parentdfcbe21d8b263c13283e226bd16596c2d7c2f9a3 (diff)
downloadopie-616e919ff6aea6a30e18edb37128c229e806beae.zip
opie-616e919ff6aea6a30e18edb37128c229e806beae.tar.gz
opie-616e919ff6aea6a30e18edb37128c229e806beae.tar.bz2
merge zeckes libsql into libopie2
Diffstat (limited to 'libopie2/opiedb/osqlitedriver.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqlitedriver.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h
new file mode 100644
index 0000000..6984539
--- a/dev/null
+++ b/libopie2/opiedb/osqlitedriver.h
@@ -0,0 +1,34 @@
+#ifndef OSQL_LITE_DRIVER_H
+#define OSQL_LITE_DRIVER_H
+
+#include <sqlite.h>
+
+#include "osqldriver.h"
+#include "osqlerror.h"
+#include "osqlresult.h"
+
+class OSQLiteDriver : public OSQLDriver {
+ Q_OBJECT
+public:
+ OSQLiteDriver( QLibrary *lib = 0l );
+ ~OSQLiteDriver();
+ QString id()const;
+ void setUserName( const QString& );
+ void setPassword( const QString& );
+ void setUrl( const QString& url );
+ void setOptions( const QStringList& );
+ bool open();
+ bool close();
+ OSQLError lastError();
+ OSQLResult query( OSQLQuery* );
+ OSQLTable::ValueList tables()const;
+private:
+ OSQLError m_lastE;
+ OSQLResult m_result;
+ OSQLResultItem m_items;
+ int handleCallBack( int, char**, char** );
+ static int call_back( void*, int, char**, char** );
+ QString m_url;
+ sqlite *m_sqlite;
+};
+#endif