ok_view.hpp 910 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // Copyright (c) 2019-2023 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 BHO_MYSQL_DETAIL_OK_VIEW_HPP
  8. #define BHO_MYSQL_DETAIL_OK_VIEW_HPP
  9. #include <asio2/bho/mysql/string_view.hpp>
  10. #include <asio2/bho/mysql/detail/flags.hpp>
  11. #include <cstdint>
  12. namespace bho {
  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 is_out_params() const noexcept { return status_flags & status_flags::out_params; }
  24. };
  25. } // namespace detail
  26. } // namespace mysql
  27. } // namespace bho
  28. #endif