File indexing completed on 2025-01-18 09:42:39
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_MYSQL_DETAIL_ANY_EXECUTION_REQUEST_HPP
0009 #define BOOST_MYSQL_DETAIL_ANY_EXECUTION_REQUEST_HPP
0010
0011 #include <boost/mysql/field_view.hpp>
0012 #include <boost/mysql/statement.hpp>
0013 #include <boost/mysql/string_view.hpp>
0014
0015 #include <boost/core/span.hpp>
0016
0017 namespace boost {
0018 namespace mysql {
0019 namespace detail {
0020
0021 struct any_execution_request
0022 {
0023 union data_t
0024 {
0025 string_view query;
0026 struct
0027 {
0028 statement stmt;
0029 span<const field_view> params;
0030 } stmt;
0031
0032 data_t(string_view q) noexcept : query(q) {}
0033 data_t(statement s, span<const field_view> params) noexcept : stmt{s, params} {}
0034 } data;
0035 bool is_query;
0036
0037 any_execution_request(string_view q) noexcept : data(q), is_query(true) {}
0038 any_execution_request(statement s, span<const field_view> params) noexcept
0039 : data(s, params), is_query(false)
0040 {
0041 }
0042 };
0043
0044 }
0045 }
0046 }
0047
0048 #endif