summaryrefslogtreecommitdiff
path: root/src/util.hpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2025-09-02 14:24:02 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2025-09-02 14:24:02 +0100
commit07a98c0ba7d2fdd79cab1884f81bb041741fc18c (patch)
treec5bb53cf275e83228cfce0952f3fb888c4aa87d5 /src/util.hpp
parent31cdf70cadf5bc135369a4bbf7f3641b4f0abb99 (diff)
downloadwebstat-07a98c0ba7d2fdd79cab1884f81bb041741fc18c.tar.bz2
webstat-07a98c0ba7d2fdd79cab1884f81bb041741fc18c.tar.xz
webstat-07a98c0ba7d2fdd79cab1884f81bb041741fc18c.zip
Add bindMany helper
Diffstat (limited to 'src/util.hpp')
-rw-r--r--src/util.hpp8
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)), ...);
+ }
}