aboutsummaryrefslogtreecommitdiff
path: root/3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2022-06-27 18:27:13 -0700
committerrtk0c <[email protected]>2022-06-27 18:27:13 -0700
commit8f0dda5eab181b0f14f2652b4e984aaaae3f258c (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h
parentfad6a88a13ab1f888ab25ad0aae19c1d63aa0623 (diff)
Start from a clean slate
Diffstat (limited to '3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h')
-rw-r--r--3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h98
1 files changed, 0 insertions, 98 deletions
diff --git a/3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h b/3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h
deleted file mode 100644
index e82b436..0000000
--- a/3rdparty/sqlitecpp/source/SQLiteCpp/VariadicBind.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * @file VariadicBind.h
- * @ingroup SQLiteCpp
- * @brief Convenience function for Statement::bind(...)
- *
- * Copyright (c) 2016 Paul Dreik ([email protected])
- * Copyright (c) 2016-2021 Sebastien Rombauts ([email protected])
- * Copyright (c) 2019 Maximilian Bachmann ([email protected])
- *
- * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
- * or copy at http://opensource.org/licenses/MIT)
- */
-#pragma once
-
-#include <SQLiteCpp/Statement.h>
-
-#if (__cplusplus >= 201402L) || ( defined(_MSC_VER) && (_MSC_VER >= 1900) ) // c++14: Visual Studio 2015
-#include <tuple>
-#endif // c++14
-
-/// @cond
-#include <utility>
-#include <initializer_list>
-
-namespace SQLite
-{
-/// @endcond
-
-/**
- * \brief Convenience function for calling Statement::bind(...) once for each argument given.
- *
- * This takes care of incrementing the index between each calls to bind.
- *
- * This feature requires a c++11 capable compiler.
- *
- * \code{.cpp}
- * SQLite::Statement stm("SELECT * FROM MyTable WHERE colA>? && colB=? && colC<?");
- * SQLite::bind(stm,a,b,c);
- * //...is equivalent to
- * stm.bind(1,a);
- * stm.bind(2,b);
- * stm.bind(3,c);
- * \endcode
- * @param query statement
- * @param args zero or more args to bind.
- */
-template<class ...Args>
-void bind(SQLite::Statement& query, const Args& ... args)
-{
- int pos = 0;
- (void)std::initializer_list<int>{
- ((void)query.bind(++pos, std::forward<decltype(args)>(args)), 0)...
- };
-}
-
-#if (__cplusplus >= 201402L) || ( defined(_MSC_VER) && (_MSC_VER >= 1900) ) // c++14: Visual Studio 2015
-
-/**
- * \brief Convenience function for calling Statement::bind(...) once for each parameter of a tuple,
- * by forwarding them to the variadic template
- *
- * This feature requires a c++14 capable compiler.
- *
- * \code{.cpp}
- * SQLite::Statement stm("SELECT * FROM MyTable WHERE colA>? && colB=? && colC<?");
- * SQLite::bind(stm, std::make_tuple(a, b, c));
- * //...is equivalent to
- * stm.bind(1,a);
- * stm.bind(2,b);
- * stm.bind(3,c);
- * \endcode
- * @param query statement
- * @param tuple tuple with values to bind
- */
-template <typename ... Types>
-void bind(SQLite::Statement& query, const std::tuple<Types...> &tuple)
-{
- bind(query, tuple, std::index_sequence_for<Types...>());
-}
-
-/**
- * \brief Convenience function for calling Statement::bind(...) once for each parameter of a tuple,
- * by forwarding them to the variadic template. This function is just needed to convert the tuples
- * to parameter packs
- *
- * This feature requires a c++14 capable compiler.
- *
- * @param query statement
- * @param tuple tuple with values to bind
- */
-template <typename ... Types, std::size_t ... Indices>
-void bind(SQLite::Statement& query, const std::tuple<Types...> &tuple, std::index_sequence<Indices...>)
-{
- bind(query, std::get<Indices>(tuple)...);
-}
-#endif // c++14
-
-} // namespace SQLite