File indexing completed on 2025-01-18 09:42:41
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_MYSQL_IMPL_INTERNAL_PROTOCOL_CONSTANTS_HPP
0009 #define BOOST_MYSQL_IMPL_INTERNAL_PROTOCOL_CONSTANTS_HPP
0010
0011 #include <cstddef>
0012 #include <cstdint>
0013
0014 namespace boost {
0015 namespace mysql {
0016 namespace detail {
0017
0018 constexpr std::size_t MAX_PACKET_SIZE = 0xffffff;
0019 constexpr std::size_t HEADER_SIZE = 4;
0020
0021
0022 constexpr std::uint16_t binary_collation = 63;
0023
0024
0025 namespace cursor_types {
0026
0027 constexpr std::uint8_t no_cursor = 0;
0028 constexpr std::uint8_t read_only = 1;
0029 constexpr std::uint8_t for_update = 2;
0030 constexpr std::uint8_t scrollable = 4;
0031
0032 }
0033
0034
0035 namespace binc {
0036
0037 constexpr std::size_t length_sz = 1;
0038 constexpr std::size_t year_sz = 2;
0039 constexpr std::size_t month_sz = 1;
0040 constexpr std::size_t date_day_sz = 1;
0041 constexpr std::size_t time_days_sz = 4;
0042 constexpr std::size_t hours_sz = 1;
0043 constexpr std::size_t mins_sz = 1;
0044 constexpr std::size_t secs_sz = 1;
0045 constexpr std::size_t micros_sz = 4;
0046 constexpr std::size_t time_sign_sz = 1;
0047
0048 constexpr std::size_t date_sz = year_sz + month_sz + date_day_sz;
0049
0050 constexpr std::size_t datetime_d_sz = date_sz;
0051 constexpr std::size_t datetime_dhms_sz = datetime_d_sz + hours_sz + mins_sz + secs_sz;
0052 constexpr std::size_t datetime_dhmsu_sz = datetime_dhms_sz + micros_sz;
0053
0054 constexpr std::size_t time_dhms_sz = time_sign_sz + time_days_sz + hours_sz + mins_sz + secs_sz;
0055 constexpr std::size_t time_dhmsu_sz = time_dhms_sz + micros_sz;
0056
0057 constexpr std::size_t time_max_days = 34;
0058
0059 }
0060
0061 }
0062 }
0063 }
0064
0065 #endif