MySQL 9.1.0
Source Code Documentation
mysql::serialization::Archive_binary_field_max_size_calculator< T, 0 > Struct Template Reference

helper structure created for partial specialization of get_max_size function of Archive_binary, specialization for defined size equal to 0. More...

#include <archive_binary_field_max_size_calculator.h>

Static Public Member Functions

template<typename = std::enable_if_t<is_string_type<T>() == false>>
static constexpr std::size_t get_max_size ()
 Calculates maximum encoded size of the variable-length integer fields. More...
 

Detailed Description

template<class T>
struct mysql::serialization::Archive_binary_field_max_size_calculator< T, 0 >

helper structure created for partial specialization of get_max_size function of Archive_binary, specialization for defined size equal to 0.

0 means default maximum size: for std::string default maximum size is unlimited, for variable length integer - sizeof(Type)+1, for double Type it equals to sizeof(Type) For unlimited strings, get_max_size is disabled (code won't compile)

Template Parameters
Ttype of field

Member Function Documentation

◆ get_max_size()

template<class T >
template<typename = std::enable_if_t<is_string_type<T>() == false>>
static constexpr std::size_t mysql::serialization::Archive_binary_field_max_size_calculator< T, 0 >::get_max_size ( )
inlinestaticconstexpr

Calculates maximum encoded size of the variable-length integer fields.

Returns
maximum encoded byte length

The documentation for this struct was generated from the following file: