Sqlite: Remove unused code

Binding by names is slower and we never used it.

Change-Id: Ia6b9b78401f8c2711be34b667ac6f08b44418773
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2020-05-26 23:01:52 +02:00
parent 9c44f8d88d
commit 9f9140b196
6 changed files with 0 additions and 130 deletions

View File

@@ -91,11 +91,6 @@ public:
bind(index, static_cast<long long>(value));
}
template <typename Type>
void bind(Utils::SmallStringView name, Type fetchValue);
int bindingIndexForName(Utils::SmallStringView name) const;
void prepare(Utils::SmallStringView sqlStatement);
void waitForUnlockNotify() const;
@@ -140,12 +135,6 @@ private:
mutable bool m_isReadyToFetchValues;
};
extern template SQLITE_EXPORT void BaseStatement::bind(Utils::SmallStringView name, int value);
extern template SQLITE_EXPORT void BaseStatement::bind(Utils::SmallStringView name, long value);
extern template SQLITE_EXPORT void BaseStatement::bind(Utils::SmallStringView name, long long value);
extern template SQLITE_EXPORT void BaseStatement::bind(Utils::SmallStringView name, double value);
extern template SQLITE_EXPORT void BaseStatement::bind(Utils::SmallStringView name, Utils::SmallStringView text);
template <> SQLITE_EXPORT int BaseStatement::fetchValue<int>(int column) const;
template <> SQLITE_EXPORT long BaseStatement::fetchValue<long>(int column) const;
template <> SQLITE_EXPORT long long BaseStatement::fetchValue<long long>(int column) const;
@@ -187,21 +176,6 @@ public:
resetter.reset();
}
template<typename... ValueType>
void bindNameValues(const ValueType&... values)
{
bindValuesByName(values...);
}
template<typename... ValueType>
void writeNamed(const ValueType&... values)
{
Resetter resetter{*this};
bindValuesByName(values...);
BaseStatement::next();
resetter.reset();
}
template <typename ResultType,
int ResultTypeCount = 1>
std::vector<ResultType> values(std::size_t reserveSize)
@@ -413,19 +387,6 @@ private:
bindValuesByIndex(index + 1, values...);
}
template<typename ValueType>
void bindValuesByName(Utils::SmallStringView name, const ValueType &value)
{
BaseStatement::bind(BaseStatement::bindingIndexForName(name), value);
}
template<typename ValueType, typename... ValueTypes>
void bindValuesByName(Utils::SmallStringView name, const ValueType &value, const ValueTypes&... values)
{
BaseStatement::bind(BaseStatement::bindingIndexForName(name), value);
bindValuesByName(values...);
}
template <typename TupleType, std::size_t... ColumnIndices>
void bindTupleValuesElement(const TupleType &tuple, std::index_sequence<ColumnIndices...>)
{