coldef_view.hpp 1010 B

123456789101112131415161718192021222324252627282930313233343536373839
  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_COLDEF_VIEW_HPP
  8. #define BOOST_MYSQL_DETAIL_COLDEF_VIEW_HPP
  9. #include <boost/mysql/column_type.hpp>
  10. #include <boost/mysql/string_view.hpp>
  11. #include <cstdint>
  12. namespace boost {
  13. namespace mysql {
  14. namespace detail {
  15. struct coldef_view
  16. {
  17. string_view database;
  18. string_view table;
  19. string_view org_table;
  20. string_view name;
  21. string_view org_name;
  22. std::uint16_t collation_id;
  23. std::uint32_t column_length; // maximum length of the field
  24. column_type type;
  25. std::uint16_t flags;
  26. std::uint8_t decimals; // max shown decimal digits. 0x00 for int/static strings; 0x1f for
  27. // dynamic strings, double, float
  28. };
  29. } // namespace detail
  30. } // namespace mysql
  31. } // namespace boost
  32. #endif