flags.hpp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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_FLAGS_HPP
  8. #define BOOST_MYSQL_DETAIL_FLAGS_HPP
  9. #include <boost/config.hpp>
  10. #include <cstdint>
  11. namespace boost {
  12. namespace mysql {
  13. namespace detail {
  14. namespace column_flags {
  15. BOOST_INLINE_CONSTEXPR std::uint16_t not_null = 1; // Field can't be NULL.
  16. BOOST_INLINE_CONSTEXPR std::uint16_t pri_key = 2; // Field is part of a primary key.
  17. BOOST_INLINE_CONSTEXPR std::uint16_t unique_key = 4; // Field is part of a unique key.
  18. BOOST_INLINE_CONSTEXPR std::uint16_t multiple_key = 8; // Field is part of a key.
  19. BOOST_INLINE_CONSTEXPR std::uint16_t blob = 16; // Field is a blob.
  20. BOOST_INLINE_CONSTEXPR std::uint16_t unsigned_ = 32; // Field is unsigned.
  21. BOOST_INLINE_CONSTEXPR std::uint16_t zerofill = 64; // Field is zerofill.
  22. BOOST_INLINE_CONSTEXPR std::uint16_t binary = 128; // Field is binary.
  23. BOOST_INLINE_CONSTEXPR std::uint16_t enum_ = 256; // field is an enum
  24. BOOST_INLINE_CONSTEXPR std::uint16_t auto_increment = 512; // field is a autoincrement field
  25. BOOST_INLINE_CONSTEXPR std::uint16_t timestamp = 1024; // Field is a timestamp.
  26. BOOST_INLINE_CONSTEXPR std::uint16_t set = 2048; // field is a set
  27. BOOST_INLINE_CONSTEXPR std::uint16_t no_default_value = 4096; // Field doesn't have default value.
  28. BOOST_INLINE_CONSTEXPR std::uint16_t on_update_now = 8192; // Field is set to NOW on UPDATE.
  29. BOOST_INLINE_CONSTEXPR std::uint16_t part_key = 16384; // Intern; Part of some key.
  30. BOOST_INLINE_CONSTEXPR std::uint16_t num = 32768; // Field is num (for clients)
  31. } // namespace column_flags
  32. namespace status_flags {
  33. BOOST_INLINE_CONSTEXPR std::uint32_t more_results = 8;
  34. BOOST_INLINE_CONSTEXPR std::uint32_t no_backslash_escapes = 512;
  35. BOOST_INLINE_CONSTEXPR std::uint32_t out_params = 4096;
  36. } // namespace status_flags
  37. } // namespace detail
  38. } // namespace mysql
  39. } // namespace boost
  40. #endif