MaxHistoryLength now has some sensible default value if the user set a negative one

This commit is contained in:
louiz’
2018-08-23 20:30:11 +02:00
parent 4a583c7b7e
commit 0b51e38281
5 changed files with 12 additions and 17 deletions
+5 -4
View File
@@ -12,13 +12,14 @@
#include <string>
void actual_bind(Statement& statement, const std::string& value, int index);
void actual_bind(Statement& statement, const std::int64_t& value, int index);
template <typename T, typename std::enable_if_t<std::is_integral<T>::value>* = 0>
void actual_bind(Statement& statement, const OptionalBool& value, int index);
template <typename T>
void actual_bind(Statement& statement, const T& value, int index)
{
actual_bind(statement, static_cast<std::int64_t>(value), index);
static_assert(std::is_integral<T>::value,
"Only a string, an optional-bool or an integer can be used.");
statement.bind_int64(index, static_cast<int>(value));
}
void actual_bind(Statement& statement, const OptionalBool& value, int index);
#ifdef DEBUG_SQL_QUERIES
#include <utils/scopetimer.hpp>