forked from qt-creator/qt-creator
Clang: Cleanup string interface of sqlite
We only will need the utf8 optimized SmallString for the indexer database. So we remove all other string bindings, QByteArray and QVariant. Change-Id: I4a77901a80b26bf292fc85df535c2ccf3a8ab52f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "columndefinition.h"
|
||||
#include "sqlstatementbuilder.h"
|
||||
|
||||
#include <QVector>
|
||||
#include <vector>
|
||||
|
||||
namespace Sqlite {
|
||||
|
||||
@@ -37,15 +37,15 @@ class SQLITE_EXPORT CreateTableSqlStatementBuilder
|
||||
public:
|
||||
CreateTableSqlStatementBuilder();
|
||||
|
||||
void setTable(const Utf8String &m_tableName);
|
||||
void addColumnDefinition(const Utf8String &columnName, ColumnType columnType, bool isPrimaryKey = false);
|
||||
void setColumnDefinitions(const QVector<ColumnDefinition> & m_columnDefinitions);
|
||||
void setUseWithoutRowId(bool m_useWithoutRowId);
|
||||
void setTable(Utils::SmallString &&tableName);
|
||||
void addColumnDefinition(Utils::SmallString &&columnName, ColumnType columnType, bool isPrimaryKey = false);
|
||||
void setColumnDefinitions(ColumnDefinitions &&columnDefinitions);
|
||||
void setUseWithoutRowId(bool useWithoutRowId);
|
||||
|
||||
void clear();
|
||||
void clearColumns();
|
||||
|
||||
Utf8String sqlStatement() const;
|
||||
Utils::SmallStringView sqlStatement() const;
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
@@ -55,8 +55,8 @@ protected:
|
||||
|
||||
private:
|
||||
mutable SqlStatementBuilder m_sqlStatementBuilder;
|
||||
Utf8String m_tableName;
|
||||
QVector<ColumnDefinition> m_columnDefinitions;
|
||||
Utils::SmallString m_tableName;
|
||||
ColumnDefinitions m_columnDefinitions;
|
||||
bool m_useWithoutRowId;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user