Sqlite: Cleanup Sqlite

We don't need the threading anymore, so we removed it. The indexer
will be run in its thread anyway, so an extra thread makes the code
only more complicated. And we added namespaces.

Change-Id: Ibcba306324763285cf653c28bb08122345e5f8da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2017-07-26 16:02:24 +02:00
parent 94ba1b8b5d
commit 3dcce060b2
50 changed files with 461 additions and 1196 deletions

View File

@@ -30,11 +30,13 @@
#include <utility>
#include <vector>
namespace Sqlite {
class SQLITE_EXPORT SqlStatementBuilder
{
using BindingPair = std::pair<Utf8String, Utf8String>;
public:
SqlStatementBuilder(const Utf8String &sqlTemplate);
SqlStatementBuilder(const Utf8String &m_sqlTemplate);
void bindEmptyText(const Utf8String &name);
void bind(const Utf8String &name, const Utf8String &text);
@@ -72,7 +74,9 @@ protected:
Q_NORETURN static void throwException(const char *whatHasHappened, const char *errorMessage);
private:
Utf8String sqlTemplate;
mutable Utf8String sqlStatement_;
mutable std::vector<BindingPair> bindings;
Utf8String m_sqlTemplate;
mutable Utf8String m_sqlStatement_;
mutable std::vector<BindingPair> m_bindings;
};
} // namespace Sqlite