MySQL 9.1.0
Source Code Documentation
variable_length_integers.h File Reference

Experimental API header. More...

#include <bit>
#include <concepts>
#include <limits>
#include "my_byteorder.h"

Go to the source code of this file.

Namespaces

namespace  mysql
 
namespace  mysql::serialization
 
namespace  mysql::serialization::detail
 

Functions

size_t mysql::serialization::detail::get_size_integer_varlen_unsigned (const std::unsigned_integral auto &data)
 Calculates the number of bytes necessary to store data. More...
 
size_t mysql::serialization::detail::get_size_integer_varlen_signed (const std::signed_integral auto &data)
 Calculates the number of bytes necessary to store data. More...
 
size_t mysql::serialization::detail::get_size_integer_varlen (const std::unsigned_integral auto &data)
 Calculates the number of bytes necessary to store data. More...
 
size_t mysql::serialization::detail::get_size_integer_varlen (const std::signed_integral auto &data)
 Calculates the number of bytes necessary to store data. More...
 
size_t mysql::serialization::detail::write_varlen_bytes_unsigned (unsigned char *stream, const std::unsigned_integral auto &data)
 Writes variable-length integer to the stream. More...
 
size_t mysql::serialization::detail::write_varlen_bytes_signed (unsigned char *stream, const std::signed_integral auto &data)
 Writes variable-length integer to the stream. More...
 
size_t mysql::serialization::detail::write_varlen_bytes (unsigned char *stream, const std::unsigned_integral auto &data)
 Writes variable-length integer to the stream. More...
 
size_t mysql::serialization::detail::write_varlen_bytes (unsigned char *stream, const std::signed_integral auto &data)
 Writes variable-length integer to the stream. More...
 
template<typename Type >
requires std::unsigned_integral<Type>
size_t mysql::serialization::detail::read_varlen_bytes_unsigned (const unsigned char *stream, std::size_t stream_bytes, Type &data)
 Reads variable-length integer from the stream. More...
 
template<typename Type >
requires std::signed_integral<Type>
size_t mysql::serialization::detail::read_varlen_bytes_signed (const unsigned char *stream, std::size_t stream_bytes, Type &data)
 Reads variable-length integer from the stream. More...
 
size_t mysql::serialization::detail::read_varlen_bytes (const unsigned char *stream, std::size_t stream_bytes, std::unsigned_integral auto &data)
 Reads variable-length integer from the stream. More...
 
size_t mysql::serialization::detail::read_varlen_bytes (const unsigned char *stream, std::size_t stream_bytes, std::signed_integral auto &data)
 Reads variable-length integer from the stream. More...
 

Detailed Description

Experimental API header.

This file contains low-level internal functions used to store/load variable-length integers to/from the memory

Please refer to the readme.md of the mysql_serialization library to find more information about the format