diff options
Diffstat (limited to 'src/util.hpp')
-rw-r--r-- | src/util.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.hpp b/src/util.hpp index dcdc654..097e032 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -1,5 +1,6 @@ #pragma once +#include <command.h> #include <tuple> namespace WebStat { @@ -13,4 +14,11 @@ namespace WebStat { }, values); } + + template<typename... T> + void + bindMany(const DB::CommandPtr & cmd, unsigned int firstParam, T &&... param) + { + (cmd->bindParam(firstParam++, std::forward<T>(param)), ...); + } } |