summaryrefslogtreecommitdiff
path: root/src/database/query.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/query.hpp')
-rw-r--r--src/database/query.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/database/query.hpp b/src/database/query.hpp
index 25c3a62..ba28b1a 100644
--- a/src/database/query.hpp
+++ b/src/database/query.hpp
@@ -12,9 +12,12 @@
#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);
-void actual_bind(Statement& statement, const std::size_t value, int index);
-void actual_bind(Statement& statement, const int 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 T& value, int index)
+{
+ actual_bind(statement, static_cast<std::int64_t>(value), index);
+}
void actual_bind(Statement& statement, const OptionalBool& value, int index);
#ifdef DEBUG_SQL_QUERIES