field_kind.ipp 1019 B

12345678910111213141516171819202122232425262728293031323334
  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_IMPL_FIELD_KIND_IPP
  8. #define BOOST_MYSQL_IMPL_FIELD_KIND_IPP
  9. #pragma once
  10. #include <boost/mysql/field_kind.hpp>
  11. #include <ostream>
  12. std::ostream& boost::mysql::operator<<(std::ostream& os, boost::mysql::field_kind v)
  13. {
  14. switch (v)
  15. {
  16. case field_kind::null: return os << "null";
  17. case field_kind::int64: return os << "int64";
  18. case field_kind::uint64: return os << "uint64";
  19. case field_kind::string: return os << "string";
  20. case field_kind::float_: return os << "float_";
  21. case field_kind::double_: return os << "double_";
  22. case field_kind::date: return os << "date";
  23. case field_kind::datetime: return os << "datetime";
  24. case field_kind::time: return os << "time";
  25. default: return os << "<invalid>";
  26. }
  27. }
  28. #endif