mirror of
https://github.com/boostorg/mysql.git
synced 2025-05-12 14:11:41 +00:00
static_results, static_execution_state
This commit is contained in:
parent
66a819c616
commit
fb13a086f0
@ -263,10 +263,6 @@ BOOST_INLINE_CONSTEXPR std::array<results_resultset_descriptor, sizeof...(Static
|
||||
mp11::make_index_sequence<sizeof...(StaticRow)>()
|
||||
);
|
||||
|
||||
template <std::size_t I, class... StaticRow>
|
||||
using rows_span_t = boost::span<
|
||||
const typename std::tuple_element<I, std::tuple<underlying_row_t<StaticRow>...>>::type>;
|
||||
|
||||
template <BOOST_MYSQL_STATIC_ROW... StaticRow>
|
||||
class static_results_impl
|
||||
{
|
||||
@ -331,7 +327,7 @@ public:
|
||||
|
||||
// User facing
|
||||
template <std::size_t I>
|
||||
rows_span_t<I, StaticRow...> get_rows() const noexcept
|
||||
span<const std::tuple_element_t<I, std::tuple<underlying_row_t<StaticRow>...>>> get_rows() const noexcept
|
||||
{
|
||||
return std::get<I>(data_.rows);
|
||||
}
|
||||
|
@ -161,6 +161,7 @@ public:
|
||||
|
||||
/**
|
||||
* \brief Returns the number of rows affected by the SQL statement associated to this resultset.
|
||||
* \details
|
||||
* Note that this is NOT the number of matched rows. If a row
|
||||
* is matched but not affected, it won't be accounted for here.
|
||||
*
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
bool has_value() const noexcept { return impl_.get_interface().is_complete(); }
|
||||
|
||||
/**
|
||||
* \brief Returns the rows retrieved by the SQL query (TODO: see this).
|
||||
* \brief Returns the rows retrieved by the SQL query.
|
||||
* \details
|
||||
*
|
||||
* \tparam I Resultset index. For operations returning more than one resultset, you can explicitly
|
||||
@ -132,12 +132,7 @@ public:
|
||||
* Constant.
|
||||
*/
|
||||
template <std::size_t I = 0>
|
||||
// #ifdef BOOST_MYSQL_DOXYGEN
|
||||
// boost::span<const StaticRow... [I]>
|
||||
// #else
|
||||
detail::rows_span_t<I, StaticRow...>
|
||||
// #endif
|
||||
rows() const noexcept
|
||||
span<const std::tuple_element_t<I, std::tuple<underlying_row_t<StaticRow>...>>> rows() const noexcept
|
||||
{
|
||||
static_assert(I < sizeof...(StaticRow), "Index I out of range");
|
||||
BOOST_ASSERT(has_value());
|
||||
|
Loading…
x
Reference in New Issue
Block a user