ok_view.hpp 1019 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_MYSQL_DETAIL_OK_VIEW_HPP
  8. #define BOOST_MYSQL_DETAIL_OK_VIEW_HPP
  9. #include <boost/mysql/string_view.hpp>
  10. #include <boost/mysql/detail/flags.hpp>
  11. #include <cstdint>
  12. namespace boost {
  13. namespace mysql {
  14. namespace detail {
  15. struct ok_view
  16. {
  17. std::uint64_t affected_rows;
  18. std::uint64_t last_insert_id;
  19. std::uint16_t status_flags;
  20. std::uint16_t warnings;
  21. string_view info;
  22. bool more_results() const noexcept { return status_flags & status_flags::more_results; }
  23. bool backslash_escapes() const noexcept { return !(status_flags & status_flags::no_backslash_escapes); }
  24. bool is_out_params() const noexcept { return status_flags & status_flags::out_params; }
  25. };
  26. } // namespace detail
  27. } // namespace mysql
  28. } // namespace boost
  29. #endif