diff options
author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2025-09-02 14:24:02 +0100 |
---|---|---|
committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2025-09-02 14:24:02 +0100 |
commit | 07a98c0ba7d2fdd79cab1884f81bb041741fc18c (patch) | |
tree | c5bb53cf275e83228cfce0952f3fb888c4aa87d5 /src/util.hpp | |
parent | 31cdf70cadf5bc135369a4bbf7f3641b4f0abb99 (diff) | |
download | webstat-07a98c0ba7d2fdd79cab1884f81bb041741fc18c.tar.bz2 webstat-07a98c0ba7d2fdd79cab1884f81bb041741fc18c.tar.xz webstat-07a98c0ba7d2fdd79cab1884f81bb041741fc18c.zip |
Add bindMany helper
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)), ...); + } } |