From 07a98c0ba7d2fdd79cab1884f81bb041741fc18c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 2 Sep 2025 14:24:02 +0100 Subject: Add bindMany helper --- src/util.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/util.hpp') 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 #include namespace WebStat { @@ -13,4 +14,11 @@ namespace WebStat { }, values); } + + template + void + bindMany(const DB::CommandPtr & cmd, unsigned int firstParam, T &&... param) + { + (cmd->bindParam(firstParam++, std::forward(param)), ...); + } } -- cgit v1.2.3