summaryrefslogtreecommitdiff
path: root/libsql/osqlitedriver.h
authorzecke <zecke>2002-08-27 20:17:50 (UTC)
committer zecke <zecke>2002-08-27 20:17:50 (UTC)
commit86352e32f449ecf00de254674b7dcac72bc34a14 (patch) (side-by-side diff)
treeb5803b69ca00dceea1e2a76a5eee390f0748f27e /libsql/osqlitedriver.h
parent1398b50ffc193bc9ab69ebe198aeda847c39516e (diff)
downloadopie-86352e32f449ecf00de254674b7dcac72bc34a14.zip
opie-86352e32f449ecf00de254674b7dcac72bc34a14.tar.gz
opie-86352e32f449ecf00de254674b7dcac72bc34a14.tar.bz2
Initial check in of the light wrapper library
around normal SQL The first driver implementation is a SQLite version
Diffstat (limited to 'libsql/osqlitedriver.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libsql/osqlitedriver.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/libsql/osqlitedriver.h b/libsql/osqlitedriver.h
new file mode 100644
index 0000000..6984539
--- a/dev/null
+++ b/libsql/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