From 8f0dda5eab181b0f14f2652b4e984aaaae3f258c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 27 Jun 2022 18:27:13 -0700 Subject: Start from a clean slate --- 3rdparty/sqlitecpp/source/SQLiteCpp/ExecuteMany.h | 90 ----------------------- 1 file changed, 90 deletions(-) delete mode 100644 3rdparty/sqlitecpp/source/SQLiteCpp/ExecuteMany.h (limited to '3rdparty/sqlitecpp/source/SQLiteCpp/ExecuteMany.h') diff --git a/3rdparty/sqlitecpp/source/SQLiteCpp/ExecuteMany.h b/3rdparty/sqlitecpp/source/SQLiteCpp/ExecuteMany.h deleted file mode 100644 index 4e7dac9..0000000 --- a/3rdparty/sqlitecpp/source/SQLiteCpp/ExecuteMany.h +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @file ExecuteMany.h - * @ingroup SQLiteCpp - * @brief Convenience function to execute a Statement with multiple Parameter sets - * - * Copyright (c) 2019 Maximilian Bachmann (contact@maxbachmann.de) - * Copyright (c) 2019-2021 Sebastien Rombauts (sebastien.rombauts@gmail.com) - * - * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt - * or copy at http://opensource.org/licenses/MIT) - */ -#pragma once - -#if (__cplusplus >= 201402L) || ( defined(_MSC_VER) && (_MSC_VER >= 1900) ) // c++14: Visual Studio 2015 - -#include -#include - -/// @cond -#include -#include -#include - -namespace SQLite -{ -/// @endcond - -/** - * \brief Convenience function to execute a Statement with multiple Parameter sets once for each parameter set given. - * - * - * This feature requires a c++14 capable compiler. - * - * \code{.cpp} - * execute_many(db, "INSERT INTO test VALUES (?, ?)", - * 1, - * std::make_tuple(2), - * std::make_tuple(3, "three") - * ); - * \endcode - * @param aDatabase Database to use - * @param apQuery Query to use with all parameter sets - * @param aArg first tuple with parameters - * @param aParams the following tuples with parameters - */ -template -void execute_many(Database& aDatabase, const char* apQuery, Arg&& aArg, Types&&... aParams) -{ - SQLite::Statement query(aDatabase, apQuery); - bind_exec(query, std::forward(aArg)); - (void)std::initializer_list - { - ((void)reset_bind_exec(query, std::forward(aParams)), 0)... - }; -} - -/** - * \brief Convenience function to reset a statement and call bind_exec to - * bind new values to the statement and execute it - * - * This feature requires a c++14 capable compiler. - * - * @param apQuery Query to use - * @param aTuple Tuple to bind - */ -template -void reset_bind_exec(Statement& apQuery, TupleT&& aTuple) -{ - apQuery.reset(); - bind_exec(apQuery, std::forward(aTuple)); -} - -/** - * \brief Convenience function to bind values a the statement and execute it - * - * This feature requires a c++14 capable compiler. - * - * @param apQuery Query to use - * @param aTuple Tuple to bind - */ -template -void bind_exec(Statement& apQuery, TupleT&& aTuple) -{ - SQLite::bind(apQuery, std::forward(aTuple)); - while (apQuery.executeStep()) {} -} - -} // namespace SQLite - -#endif // c++14 -- cgit v1.2.3-70-g09d2