summaryrefslogtreecommitdiff
path: root/libopie2/opiedb/osqlitedriver.h
authorbrad <brad>2004-04-06 10:38:36 (UTC)
committer brad <brad>2004-04-06 10:38:36 (UTC)
commit4738d39e8168e24cbaae8a7ea3c71f00552d5dac (patch) (side-by-side diff)
tree3404a879fb4275d899af2939bfb54f751e3cacfe /libopie2/opiedb/osqlitedriver.h
parent8981e35697647315d88cdf95e912b0fe2f9d5375 (diff)
downloadopie-4738d39e8168e24cbaae8a7ea3c71f00552d5dac.zip
opie-4738d39e8168e24cbaae8a7ea3c71f00552d5dac.tar.gz
opie-4738d39e8168e24cbaae8a7ea3c71f00552d5dac.tar.bz2
Made sqlite regex cache "instance safe". Further work will continue as I figure out
how to do it :p)
Diffstat (limited to 'libopie2/opiedb/osqlitedriver.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiedb/osqlitedriver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h
index 9064e52..95c9e2f 100644
--- a/libopie2/opiedb/osqlitedriver.h
+++ b/libopie2/opiedb/osqlitedriver.h
@@ -1,19 +1,25 @@
#ifndef OSQL_LITE_DRIVER_H
#define OSQL_LITE_DRIVER_H
#include <sqlite.h>
+#include <regex.h>
#include "osqldriver.h"
#include "osqlerror.h"
#include "osqlresult.h"
namespace Opie {
namespace DB {
namespace Internal {
+struct sqregex {
+ char *regex_raw;
+ regex_t regex_c;
+};
+
class OSQLiteDriver : public OSQLDriver {
Q_OBJECT
public:
OSQLiteDriver( QLibrary *lib = 0l );
~OSQLiteDriver();
QString id()const;
@@ -23,20 +29,22 @@ public:
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;
+ sqregex *sqreg;
};
}
}
}
#endif