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,17 +30,17 @@
#include <QVector>
namespace Internal {
namespace Sqlite {
class SQLITE_EXPORT CreateTableSqlStatementBuilder
{
public:
CreateTableSqlStatementBuilder();
void setTable(const Utf8String &tableName);
void setTable(const Utf8String &m_tableName);
void addColumnDefinition(const Utf8String &columnName, ColumnType columnType, bool isPrimaryKey = false);
void setColumnDefinitions(const QVector<ColumnDefinition> & columnDefinitions);
void setUseWithoutRowId(bool useWithoutRowId);
void setColumnDefinitions(const QVector<ColumnDefinition> & m_columnDefinitions);
void setUseWithoutRowId(bool m_useWithoutRowId);
void clear();
void clearColumns();
@@ -54,10 +54,10 @@ protected:
void bindAll() const;
private:
mutable SqlStatementBuilder sqlStatementBuilder;
Utf8String tableName;
QVector<ColumnDefinition> columnDefinitions;
bool useWithoutRowId;
mutable SqlStatementBuilder m_sqlStatementBuilder;
Utf8String m_tableName;
QVector<ColumnDefinition> m_columnDefinitions;
bool m_useWithoutRowId;
};
}
} // namespace Sqlite