flags.hpp 1.8 KB

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