forked from qt-creator/qt-creator
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:
@@ -25,57 +25,7 @@
|
||||
|
||||
#include "sqlitecolumn.h"
|
||||
|
||||
SqliteColumn::SqliteColumn()
|
||||
: type_(ColumnType::Numeric),
|
||||
isPrimaryKey_(false)
|
||||
{
|
||||
namespace Sqlite {
|
||||
|
||||
}
|
||||
|
||||
void SqliteColumn::clear()
|
||||
{
|
||||
name_.clear();
|
||||
type_ = ColumnType::Numeric;
|
||||
isPrimaryKey_ = false;
|
||||
}
|
||||
|
||||
void SqliteColumn::setName(const Utf8String &newName)
|
||||
{
|
||||
name_ = newName;
|
||||
}
|
||||
|
||||
const Utf8String &SqliteColumn::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void SqliteColumn::setType(ColumnType newType)
|
||||
{
|
||||
type_ = newType;
|
||||
}
|
||||
|
||||
ColumnType SqliteColumn::type() const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void SqliteColumn::setIsPrimaryKey(bool isPrimaryKey)
|
||||
{
|
||||
isPrimaryKey_ = isPrimaryKey;
|
||||
}
|
||||
|
||||
bool SqliteColumn::isPrimaryKey() const
|
||||
{
|
||||
return isPrimaryKey_;
|
||||
}
|
||||
|
||||
Internal::ColumnDefinition SqliteColumn::columnDefintion() const
|
||||
{
|
||||
Internal::ColumnDefinition columnDefinition;
|
||||
|
||||
columnDefinition.setName(name_);
|
||||
columnDefinition.setType(type_);
|
||||
columnDefinition.setIsPrimaryKey(isPrimaryKey_);
|
||||
|
||||
return columnDefinition;
|
||||
}
|
||||
} // namespace Sqlite
|
||||
|
||||
Reference in New Issue
Block a user