A fast and reliable embedded key-value ACID storage engine without WAL.
Version 0.15.0.98 (2026-09-30T12:43:01Z)
Loading...
Searching...
No Matches
C++ API

Topics

 Exceptions and Errors
 Slices and Buffers
 Environment, Transactions, Cursors, Key-value tables and map handles

Namespaces

namespace  mdbx
 The libmdbx C++ API namespace.
namespace  std
 STL namespace.

Macros

#define MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR   1
 Defined as 1 if the mdbx::polymorphic_allocator is available.
#define MDBX_STD_FILESYSTEM_PATH   ::mdbx::filesystem::path
 Defined if mdbx::filesystem::path is available.

Typedefs

using mdbx::byte = char8_t
 The byte-like type that don't presumes aliases for pointers as does the char.
using mdbx::version_info = ::MDBX_version_info
 libmdbx version information,
using mdbx::build_info = ::MDBX_build_info
 libmdbx build information
using mdbx::legacy_allocator = ::std::string::allocator_type
 Legacy allocator but it is recommended to use polymorphic_allocator.
using mdbx::polymorphic_allocator = ::std::pmr::string::allocator_type
 Default polymorphic allocator for modern code.
using mdbx::default_allocator = polymorphic_allocator
using mdbx::txnid = uint64_t
 Transaction ID and MVCC-snapshot number.
template<class ALLOCATOR = default_allocator>
using mdbx::string = ::std::basic_string<char, ::std::char_traits<char>, ALLOCATOR>
 Default single-byte string.
using mdbx::filehandle = ::mdbx_filehandle_t
using mdbx::path = ::mdbx::filesystem::path
using mdbx::path_string = ::mdbx::filesystem::path::string_type
using mdbx::path_char = path_string::value_type
using mdbx::duration = ::std::chrono::duration<unsigned, ::std::ratio<1, 65536>>
 Duration in 1/65536 units of second.
using mdbx::default_buffer = buffer<default_allocator, default_capacity_policy>
 Default buffer.
template<typename BUFFER>
using mdbx::buffer_pair = buffer_pair_spec<typename BUFFER::allocator_type, typename BUFFER::reservation_policy>
 Combines pair of buffers for key and value to hold an operands for certain operations.
using mdbx::default_buffer_pair = buffer_pair<default_buffer>
 Default pair of buffers.

Functions

constexpr const version_info & mdbx::get_version () noexcept
 Returns libmdbx version information.
constexpr const build_info & mdbx::get_build () noexcept
 Returns libmdbx build information.
constexpr bool mdbx::operator== (const error &a, const error &b)
constexpr bool mdbx::operator!= (const error &a, const error &b)
constexpr bool mdbx::operator== (const slice &a, const slice &b)
constexpr bool mdbx::operator< (const slice &a, const slice &b)
constexpr bool mdbx::operator> (const slice &a, const slice &b)
constexpr bool mdbx::operator<= (const slice &a, const slice &b)
constexpr bool mdbx::operator>= (const slice &a, const slice &b)
constexpr bool mdbx::operator!= (const slice &a, const slice &b)
template<class ALLOCATOR, typename CAPACITY_POLICY>
inline ::std::ostream & mdbx::operator<< (::std::ostream &out, const buffer< ALLOCATOR, CAPACITY_POLICY > &it)
 mdbx::MDBX_EXTERN_API_TEMPLATE (LIBMDBX_API_TYPE, buffer< legacy_allocator, default_capacity_policy >)
 mdbx::MDBX_EXTERN_API_TEMPLATE (LIBMDBX_API_TYPE, buffer< polymorphic_allocator, default_capacity_policy >)
template<class ALLOCATOR, class CAPACITY_POLICY, MutableByteProducer PRODUCER>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::make_buffer (PRODUCER &producer, const ALLOCATOR &alloc)
template<class ALLOCATOR, class CAPACITY_POLICY, ImmutableByteProducer PRODUCER>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::make_buffer (const PRODUCER &producer, const ALLOCATOR &alloc)
template<class ALLOCATOR, MutableByteProducer PRODUCER>
string< ALLOCATOR > mdbx::make_string (PRODUCER &producer, const ALLOCATOR &alloc)
template<class ALLOCATOR, ImmutableByteProducer PRODUCER>
string< ALLOCATOR > mdbx::make_string (const PRODUCER &producer, const ALLOCATOR &alloc)
constexpr bool mdbx::operator== (const pair &a, const pair &b)
constexpr bool mdbx::operator< (const pair &a, const pair &b)
constexpr bool mdbx::operator> (const pair &a, const pair &b)
constexpr bool mdbx::operator<= (const pair &a, const pair &b)
constexpr bool mdbx::operator>= (const pair &a, const pair &b)
constexpr bool mdbx::operator!= (const pair &a, const pair &b)
inline ::std::ostream & mdbx::operator<< (::std::ostream &out, const to_hex &wrapper)
inline ::std::ostream & mdbx::operator<< (::std::ostream &out, const to_base58 &wrapper)
inline ::std::ostream & mdbx::operator<< (::std::ostream &out, const to_base64 &wrapper)
int mdbx::compare_position_nothrow (const cursor &left, const cursor &right, bool ignore_nested=false)
int mdbx::compare_position (const cursor &left, const cursor &right, bool ignore_nested=false)
ptrdiff_t mdbx::estimate (const cursor &from, const cursor &to)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const slice &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const pair &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const pair_result &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::geometry::size &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::geometry &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::operate_parameters &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::mode &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::durability &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::reclaiming_options &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env::operate_options &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const env_managed::create_parameters &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const MDBX_log_level_t &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const MDBX_debug_flags_t &)
LIBMDBX_API::std::ostream & mdbx::operator<< (::std::ostream &, const error &)
inline ::std::ostream & mdbx::operator<< (::std::ostream &out, const MDBX_error_t &errcode)
constexpr mdbx::map_handle::info::info (map_handle::flags flags, map_handle::state state) noexcept
MDBX_CXX11_CONSTEXPR_ENUM mdbx::key_mode mdbx::map_handle::info::key_mode () const noexcept
MDBX_CXX11_CONSTEXPR_ENUM mdbx::value_mode mdbx::map_handle::info::value_mode () const noexcept
bool mdbx::exception_thunk::is_clean () const noexcept
void mdbx::exception_thunk::capture () noexcept
void mdbx::exception_thunk::rethrow_captured () const
constexpr mdbx::error::error (MDBX_error_t error_code) noexcept
constexpr bool mdbx::error::is_success () const noexcept
constexpr bool mdbx::error::is_result_true () const noexcept
constexpr bool mdbx::error::is_result_false () const noexcept
constexpr bool mdbx::error::is_failure () const noexcept
constexpr MDBX_error_t mdbx::error::code () const noexcept
 Returns error code.
constexpr bool mdbx::error::is_mdbx_error () const noexcept
 Returns true for MDBX's errors.
static void mdbx::error::throw_exception (int error_code)
void mdbx::error::throw_on_failure () const
void mdbx::error::success_or_throw () const
void mdbx::error::success_or_throw (const exception_thunk &) const
static void mdbx::error::throw_on_nullptr (const void *ptr, MDBX_error_t error_code)
static void mdbx::error::throw_on_failure (int error_code)
static void mdbx::error::success_or_throw (MDBX_error_t error_code)
static bool mdbx::error::boolean_or_throw (int error_code)
static void mdbx::error::success_or_throw (int error_code, const exception_thunk &)
static bool mdbx::error::boolean_or_throw (int error_code, const exception_thunk &)
constexpr mdbx::slice::slice () noexcept
 Create an empty slice.
constexpr mdbx::slice::slice (const void *ptr, size_t bytes)
 Create a slice that refers to [0,bytes-1] of memory bytes pointed by ptr.
constexpr mdbx::slice::slice (const void *begin, const void *end)
 Create a slice that refers to [begin,end] of memory bytes.
constexpr mdbx::slice::slice (const char *c_str)
 Create a slice that refers to c_str[0,strlen(c_str)-1].
constexpr mdbx::slice::slice (const MDBX_val &src)
constexpr mdbx::slice::slice (MDBX_val &&src)
constexpr mdbx::slice::slice (slice &&src) noexcept
slice & mdbx::slice::assign (const void *ptr, size_t bytes)
slice & mdbx::slice::assign (const slice &src) noexcept
slice & mdbx::slice::assign (const ::MDBX_val &src)
slice & mdbx::slice::assign (slice &&src) noexcept
slice & mdbx::slice::assign (::MDBX_val &&src)
slice & mdbx::slice::assign (const void *begin, const void *end)
slice & mdbx::slice::assign (const char *c_str)
slice & mdbx::slice::operator= (slice &&src) noexcept
slice & mdbx::slice::operator= (::MDBX_val &&src)
constexpr const byte * mdbx::slice::byte_ptr () const noexcept
 Returns casted to pointer to byte an address of data.
constexpr const byte * mdbx::slice::end_byte_ptr () const noexcept
 Returns casted to pointer to byte an end of data.
constexpr byte * mdbx::slice::byte_ptr () noexcept
constexpr byte * mdbx::slice::end_byte_ptr () noexcept
constexpr const char * mdbx::slice::char_ptr () const noexcept
 Returns casted to pointer to char an address of data.
constexpr const char * mdbx::slice::end_char_ptr () const noexcept
 Returns casted to pointer to char an end of data.
constexpr char * mdbx::slice::char_ptr () noexcept
constexpr char * mdbx::slice::end_char_ptr () noexcept
constexpr const void * mdbx::slice::data () const noexcept
 Return a pointer to the beginning of the referenced data.
constexpr const byte * mdbx::slice::end () const noexcept
 Return a pointer to the end of the referenced data.
constexpr void * mdbx::slice::data () noexcept
constexpr byte * mdbx::slice::end () noexcept
 Return a pointer to the end of the referenced data.
constexpr size_t mdbx::slice::length () const noexcept
 Returns the number of bytes.
constexpr slice & mdbx::slice::set_length (size_t bytes)
 Set slice length.
constexpr slice & mdbx::slice::set_end (const void *ptr)
 Sets the length by specifying the end of the slice data.
constexpr bool mdbx::slice::empty () const noexcept
 Checks whether the slice is empty.
constexpr bool mdbx::slice::is_null () const noexcept
 Checks whether the slice data pointer is nullptr.
constexpr size_t mdbx::slice::size () const noexcept
 Returns the number of bytes.
constexpr void mdbx::slice::invalidate () noexcept
 Invalidates the slice by nullifying the data pointer while preserving the length; makes is_valid() return false unless the slice was already of zero length.
constexpr void mdbx::slice::clear () noexcept
 Makes the slice empty and referencing to nothing.
void mdbx::slice::remove_prefix (size_t n) noexcept
 Drops the first "n" bytes from this slice.
void mdbx::slice::safe_remove_prefix (size_t n)
 Drops the first "n" bytes from this slice.
void mdbx::slice::remove_suffix (size_t n) noexcept
 Drops the last "n" bytes from this slice.
void mdbx::slice::safe_remove_suffix (size_t n)
 Drops the last "n" bytes from this slice.
constexpr bool mdbx::slice::starts_with (const slice &prefix) const noexcept
 Checks if the data starts with the given prefix.
constexpr bool mdbx::slice::ends_with (const slice &suffix) const noexcept
 Checks if the data ends with the given suffix.
constexpr size_t mdbx::slice::hash_value () const noexcept
 Returns the hash value of referenced data.
constexpr byte mdbx::slice::operator[] (size_t n) const noexcept
 Returns the nth byte in the referenced data.
constexpr byte mdbx::slice::at (size_t n) const
 Returns the nth byte in the referenced data with bounds checking.
constexpr slice mdbx::slice::head (size_t n) const noexcept
 Returns the first "n" bytes of the slice.
constexpr slice mdbx::slice::tail (size_t n) const noexcept
 Returns the last "n" bytes of the slice.
constexpr slice mdbx::slice::middle (size_t from, size_t n) const noexcept
 Returns the middle "n" bytes of the slice.
constexpr const byte * mdbx::slice::begin () const noexcept
 Returns an iterator to the beginning of the referenced data.
constexpr byte * mdbx::slice::begin () noexcept
 Returns an iterator to the beginning of the referenced data.
constexpr size_t mdbx::slice::find (const slice &needle, size_t pos=0) const noexcept
 Finds the first occurrence of needle starting at pos.
constexpr size_t mdbx::slice::find (byte c, size_t pos=0) const noexcept
 Finds the first occurrence of needle starting at pos.
constexpr size_t mdbx::slice::rfind (const slice &needle, size_t pos=npos) const noexcept
 Finds the last occurrence of needle not after pos.
constexpr size_t mdbx::slice::rfind (byte c, size_t pos=npos) const noexcept
 Finds the last occurrence of needle not after pos.
constexpr size_t mdbx::slice::find_first_of (const slice &chars, size_t pos=0) const noexcept
 Finds the first byte matching any byte of chars starting at pos.
constexpr size_t mdbx::slice::find_first_of (byte c, size_t pos=0) const noexcept
 Finds the first byte matching any byte of chars starting at pos.
constexpr size_t mdbx::slice::find_last_of (const slice &chars, size_t pos=npos) const noexcept
 Finds the last byte matching any byte of chars not after pos.
constexpr size_t mdbx::slice::find_last_of (byte c, size_t pos=npos) const noexcept
 Finds the last byte matching any byte of chars not after pos.
constexpr size_t mdbx::slice::find_first_not_of (const slice &chars, size_t pos=0) const noexcept
 Finds the first byte not matching any byte of chars starting at pos.
constexpr size_t mdbx::slice::find_first_not_of (byte c, size_t pos=0) const noexcept
 Finds the first byte not matching any byte of chars starting at pos.
constexpr size_t mdbx::slice::find_last_not_of (const slice &chars, size_t pos=npos) const noexcept
 Finds the last byte not matching any byte of chars not after pos.
constexpr size_t mdbx::slice::find_last_not_of (byte c, size_t pos=npos) const noexcept
 Finds the last byte not matching any byte of chars not after pos.
constexpr slice mdbx::slice::safe_head (size_t n) const
 Returns the first "n" bytes of the slice.
constexpr slice mdbx::slice::safe_tail (size_t n) const
 Returns the last "n" bytes of the slice.
constexpr slice mdbx::slice::safe_middle (size_t from, size_t n) const
 Returns the middle "n" bytes of the slice.
static constexpr intptr_t mdbx::slice::compare_fast (const slice &a, const slice &b) noexcept
 Three-way fast non-lexicographically length-based comparison.
static constexpr intptr_t mdbx::slice::compare_lexicographically (const slice &a, const slice &b) noexcept
 Three-way lexicographically comparison.
constexpr mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::buffer (const struct slice &src, bool make_reference, const allocator_type &alloc=allocator_type())
template<class ALLOCATOR, typename CAPACITY_POLICY>
 mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::buffer (const txn &transaction, const struct slice &src, const allocator_type &alloc)
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::to_hex::as_string (const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a string with a hexadecimal dump of a passed slice.
template<class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::to_hex::as_buffer (const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a buffer with a hexadecimal dump of a passed slice.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::to_base58::as_string (const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a string with a Base58 dump of a passed slice.
template<class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::to_base58::as_buffer (const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a buffer with a Base58 dump of a passed slice.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::to_base64::as_string (const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a string with a Base64 dump of a passed slice.
template<class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::to_base64::as_buffer (const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a buffer with a Base64 dump of a passed slice.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::from_hex::as_string (const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes hexadecimal dump from a passed slice to returned string.
template<class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::from_hex::as_buffer (const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes hexadecimal dump from a passed slice to returned buffer.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::from_base58::as_string (const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes Base58 dump from a passed slice to returned string.
template<class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::from_base58::as_buffer (const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes Base58 dump from a passed slice to returned buffer.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::from_base64::as_string (const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes Base64 dump from a passed slice to returned string.
template<class ALLOCATOR = default_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::from_base64::as_buffer (const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes Base64 dump from a passed slice to returned buffer.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::slice::as_hex_string (bool uppercase=false, unsigned wrap_width=0, const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a string with a hexadecimal dump of the slice content.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::slice::as_base58_string (unsigned wrap_width=0, const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a string with a Base58 dump of the slice content.
template<class ALLOCATOR = default_allocator>
string< ALLOCATOR > mdbx::slice::as_base64_string (unsigned wrap_width=0, const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a string with a Base64 dump of the slice content.
template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::encode_hex (bool uppercase=false, unsigned wrap_width=0, const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a buffer with a hexadecimal dump of the slice content.
template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::encode_base58 (unsigned wrap_width=0, const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a buffer with a Base58 dump of the slice content.
template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::encode_base64 (unsigned wrap_width=0, const ALLOCATOR &alloc=ALLOCATOR()) const
 Returns a buffer with a Base64 dump of the slice content.
template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::hex_decode (bool ignore_spaces=false, const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes hexadecimal dump from the slice content to returned buffer.
template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::base58_decode (bool ignore_spaces=false, const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes Base58 dump from the slice content to returned buffer.
template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::base64_decode (bool ignore_spaces=false, const ALLOCATOR &alloc=ALLOCATOR()) const
 Decodes Base64 dump from the slice content to returned buffer.
static constexpr intptr_t mdbx::pair::compare_fast (const pair &a, const pair &b) noexcept
 Three-way fast non-lexicographically length-based comparison.
static constexpr intptr_t mdbx::pair::compare_lexicographically (const pair &a, const pair &b) noexcept
 Three-way lexicographically comparison.
bool mdbx::slice::is_hex (bool ignore_spaces=false) const noexcept
 Checks whether the content of the slice is a hexadecimal dump.
bool mdbx::slice::is_base58 (bool ignore_spaces=false) const noexcept
 Checks whether the content of the slice is a Base58 dump.
bool mdbx::slice::is_base64 (bool ignore_spaces=false) const noexcept
 Checks whether the content of the slice is a Base64 dump.
constexpr mdbx::env::env (MDBX_env *ptr) noexcept
env & mdbx::env::operator= (env &&) noexcept
 mdbx::env::env (env &&) noexcept
 mdbx::env::~env () noexcept
constexpr geometry & mdbx::env::geometry::make_fixed (intptr_t size) noexcept
constexpr geometry & mdbx::env::geometry::make_dynamic (intptr_t lower=default_value, intptr_t upper=default_value) noexcept
constexpr geometry & mdbx::env::geometry::set_size_lower (intptr_t size) noexcept
 Sets the lower bound of database size in bytes.
constexpr geometry & mdbx::env::geometry::set_size_now (intptr_t size) noexcept
 Sets the size in bytes to setup the database size for now.
constexpr geometry & mdbx::env::geometry::set_size_upper (intptr_t size) noexcept
 Sets the upper bound of database size in bytes.
constexpr geometry & mdbx::env::geometry::set_growth_step (intptr_t step) noexcept
 Sets the growth step in bytes.
constexpr geometry & mdbx::env::geometry::set_shrink_threshold (intptr_t threshold) noexcept
 Sets the shrink threshold in bytes.
constexpr geometry & mdbx::env::geometry::set_pagesize (intptr_t size) noexcept
 Sets the database page size for new database creation.
static MDBX_NODISCARD env::reclaiming_options mdbx::env::operate_parameters::reclaiming_from_flags (MDBX_env_flags_t flags) noexcept
static MDBX_NODISCARD env::operate_options mdbx::env::operate_parameters::options_from_flags (MDBX_env_flags_t flags) noexcept
constexpr create_parameters & mdbx::env_managed::create_parameters::set_geometry (const env::geometry &value) noexcept
 Sets the database geometry for size management.
constexpr create_parameters & mdbx::env_managed::create_parameters::set_file_mode_bits (mdbx_mode_t value) noexcept
 Sets the file mode bits used for creation of the DB files.
constexpr create_parameters & mdbx::env_managed::create_parameters::set_use_subdirectory (bool value=true) noexcept
 Sets whether to use a subdirectory to place the DB files.
constexpr operate_parameters & mdbx::env::operate_parameters::set_max_maps (unsigned value) noexcept
 Sets the maximum number of named tables/maps for the environment. Zero means default value.
constexpr operate_parameters & mdbx::env::operate_parameters::set_max_readers (unsigned value) noexcept
 Sets the maximum number of threads/reader slots for the environment. Zero means default value.
constexpr operate_parameters & mdbx::env::operate_parameters::set_mode (env::mode value) noexcept
 Sets the operation mode.
constexpr operate_parameters & mdbx::env::operate_parameters::set_durability (env::durability value) noexcept
 Sets the durability level.
constexpr operate_parameters & mdbx::env::operate_parameters::set_reclaiming (const env::reclaiming_options &value) noexcept
 Sets the garbage reclaiming options.
constexpr operate_parameters & mdbx::env::operate_parameters::set_options (const env::operate_options &value) noexcept
 Sets the operate options.
constexpr operate_parameters & mdbx::env::operate_parameters::readonly () noexcept
 Sets the operation mode to env::mode::readonly.
constexpr operate_parameters & mdbx::env::operate_parameters::write_file_io () noexcept
 Sets the operation mode to env::mode::write_file_io.
constexpr operate_parameters & mdbx::env::operate_parameters::write_mapped_io () noexcept
 Sets the operation mode to env::mode::write_mapped_io.
constexpr operate_parameters & mdbx::env::operate_parameters::robust_synchronous () noexcept
 Sets the durability level to env::durability::robust_synchronous.
constexpr operate_parameters & mdbx::env::operate_parameters::half_synchronous_weak_last () noexcept
 Sets the durability level to env::durability::half_synchronous_weak_last.
constexpr operate_parameters & mdbx::env::operate_parameters::lazy_weak_tail () noexcept
 Sets the durability level to env::durability::lazy_weak_tail.
constexpr operate_parameters & mdbx::env::operate_parameters::whole_fragile () noexcept
 Sets the durability level to env::durability::whole_fragile.
constexpr operate_parameters & mdbx::env::operate_parameters::nested_transactions (bool value=true) noexcept
 Sets the nested transactions mode, i.e. operate_options::nested_transactions.
constexpr operate_parameters & mdbx::env::operate_parameters::lifo (bool value=true) noexcept
 Sets the LIFO reclaiming mode, i.e. reclaiming_options::lifo.
constexpr operate_parameters & mdbx::env::operate_parameters::no_sticky_threads (bool value=true) noexcept
 Sets the "no sticky threads" mode, i.e. operate_options::no_sticky_threads.
constexpr operate_parameters & mdbx::env::operate_parameters::exclusive (bool value=true) noexcept
 Sets the exclusive mode, i.e. operate_options::exclusive.
constexpr operate_parameters & mdbx::env::operate_parameters::disable_readahead (bool value=true) noexcept
 Sets the readahead disable mode, i.e. operate_options::disable_readahead.
constexpr operate_parameters & mdbx::env::operate_parameters::disable_clear_memory (bool value=true) noexcept
 Sets the clear-memory disable mode, i.e. operate_options::disable_clear_memory.
constexpr operate_parameters & mdbx::env::operate_parameters::enable_validation (bool value=true) noexcept
 Sets the validation enable mode, i.e. operate_options::enable_validation.
static constexpr operate_parameters mdbx::env::operate_parameters::read_only () noexcept
 Constructs parameters for a read-only environment.
static constexpr operate_parameters mdbx::env::operate_parameters::safe_write () noexcept
 Constructs parameters for a writable environment with env::durability::robust_synchronous durability and env::mode::write_mapped_io.
static constexpr operate_parameters mdbx::env::operate_parameters::lazy_write () noexcept
 Constructs parameters for a writable environment with env::durability::lazy_weak_tail durability and env::mode::write_mapped_io.
static constexpr operate_parameters mdbx::env::operate_parameters::fragile_write () noexcept
 Constructs parameters for a writable environment with env::durability::whole_fragile durability and env::mode::write_mapped_io.
constexpr reclaiming_options & mdbx::env::reclaiming_options::set_lifo (bool value=true) noexcept
 Sets the LIFO reclaiming mode.
constexpr operate_options & mdbx::env::operate_options::set_no_sticky_threads (bool value=true) noexcept
 Sets the "no sticky threads" mode.
constexpr operate_options & mdbx::env::operate_options::set_nested_transactions (bool value=true) noexcept
 Sets the nested transactions mode.
constexpr operate_options & mdbx::env::operate_options::set_exclusive (bool value=true) noexcept
 Sets the exclusive mode.
constexpr operate_options & mdbx::env::operate_options::set_disable_readahead (bool value=true) noexcept
 Sets the readahead disable mode.
constexpr operate_options & mdbx::env::operate_options::set_disable_clear_memory (bool value=true) noexcept
 Sets the clear-memory disable mode.
constexpr operate_options & mdbx::env::operate_options::set_enable_validation (bool value=true) noexcept
 Sets the validation enable mode.
static size_t mdbx::env::limits::pagesize_min () noexcept
 Returns the minimal database page size in bytes.
static size_t mdbx::env::limits::pagesize_max () noexcept
 Returns the maximal database page size in bytes.
static size_t mdbx::env::limits::dbsize_min (intptr_t pagesize)
 Returns the minimal database size in bytes for specified page size.
static size_t mdbx::env::limits::dbsize_max (intptr_t pagesize)
 Returns the maximal database size in bytes for specified page size.
static size_t mdbx::env::limits::key_min (MDBX_db_flags_t flags) noexcept
 Returns the minimal key size in bytes for specified table flags.
static size_t mdbx::env::limits::key_min (key_mode mode) noexcept
 Returns the minimal key size in bytes for specified keys mode.
static size_t mdbx::env::limits::key_max (intptr_t pagesize, MDBX_db_flags_t flags)
 Returns the maximal key size in bytes for specified page size and table flags.
static size_t mdbx::env::limits::key_max (intptr_t pagesize, key_mode mode)
 Returns the maximal key size in bytes for specified page size and keys mode.
static size_t mdbx::env::limits::key_max (const env &, MDBX_db_flags_t flags)
 Returns the maximal key size in bytes for given environment and table flags.
static size_t mdbx::env::limits::key_max (const env &, key_mode mode)
 Returns the maximal key size in bytes for given environment and keys mode.
static size_t mdbx::env::limits::value_min (MDBX_db_flags_t flags) noexcept
 Returns the minimal values size in bytes for specified table flags.
static size_t mdbx::env::limits::value_min (value_mode) noexcept
 Returns the minimal values size in bytes for specified values mode.
static size_t mdbx::env::limits::value_max (intptr_t pagesize, MDBX_db_flags_t flags)
 Returns the maximal value size in bytes for specified page size and table flags.
static size_t mdbx::env::limits::value_max (intptr_t pagesize, value_mode)
 Returns the maximal value size in bytes for specified page size and values mode.
static size_t mdbx::env::limits::value_max (const env &, MDBX_db_flags_t flags)
 Returns the maximal value size in bytes for given environment and table flags.
static size_t mdbx::env::limits::value_max (const env &, value_mode)
 Returns the maximal value size in bytes for given environment and values mode.
static size_t mdbx::env::limits::pairsize4page_max (intptr_t pagesize, MDBX_db_flags_t flags)
 Returns maximal size of key-value pair to fit in a single page for specified page size and table flags.
static size_t mdbx::env::limits::pairsize4page_max (intptr_t pagesize, value_mode)
 Returns maximal size of key-value pair to fit in a single page for specified page size and values mode.
static size_t mdbx::env::limits::pairsize4page_max (const env &, MDBX_db_flags_t flags)
 Returns maximal size of key-value pair to fit in a single page for given environment and table flags.
static size_t mdbx::env::limits::pairsize4page_max (const env &, value_mode)
 Returns maximal size of key-value pair to fit in a single page for given environment and values mode.
static size_t mdbx::env::limits::valsize4page_max (intptr_t pagesize, MDBX_db_flags_t flags)
 Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for specified size and table flags.
static size_t mdbx::env::limits::valsize4page_max (intptr_t pagesize, value_mode)
 Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for specified page size and values mode.
static size_t mdbx::env::limits::valsize4page_max (const env &, MDBX_db_flags_t flags)
 Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for given environment and table flags.
static size_t mdbx::env::limits::valsize4page_max (const env &, value_mode)
 Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for given environment and values mode.
static size_t mdbx::env::limits::transaction_size_max (intptr_t pagesize)
 Returns the maximal write transaction size (i.e. limit for summary volume of dirty pages) in bytes for specified page size.
static size_t mdbx::env::limits::max_map_handles (void)
 Returns the maximum opened map handles, aka DBI-handles.
MDBX_NODISCARD env::operate_parameters mdbx::env::get_operation_parameters () const
 Returns current operation parameters.
MDBX_NODISCARD env::mode mdbx::env::get_mode () const
 Returns current operation mode.
MDBX_NODISCARD env::durability mdbx::env::get_durability () const
 Returns current durability mode.
MDBX_NODISCARD env::reclaiming_options mdbx::env::get_reclaiming () const
 Returns current reclaiming options.
MDBX_NODISCARD env::operate_options mdbx::env::get_options () const
 Returns current operate options.
stat mdbx::env::get_stat () const
 Returns snapshot statistics about the MDBX environment.
stat mdbx::env::get_stat (const txn &) const
 Return statistics about the MDBX environment accordingly to the specified transaction.
info mdbx::env::get_info () const
 Return snapshot information about the MDBX environment.
info mdbx::env::get_info (const txn &) const
 Return information about the MDBX environment accordingly to the specified transaction.
filehandle mdbx::env::get_filehandle () const
 Returns the file descriptor for the DXB file of MDBX environment.
MDBX_env_flags_t mdbx::env::get_flags () const
 Returns environment flags.
unsigned mdbx::env::max_readers () const
 Returns the maximum number of threads/reader slots for the environment.
unsigned mdbx::env::max_maps () const
 Returns the maximum number of named tables for the environment.
void * mdbx::env::get_context () const noexcept
 Returns the application context associated with the environment.
env & mdbx::env::set_context (void *your_context)
 Sets the application context associated with the environment.
env & mdbx::env::set_sync_threshold (size_t bytes)
 Sets threshold to force flush the data buffers to disk, for non-sync durability modes.
size_t mdbx::env::sync_threshold () const
 Gets threshold used to force flush the data buffers to disk, for non-sync durability modes.
env & mdbx::env::set_sync_period__seconds_16dot16 (unsigned seconds_16dot16)
 Sets relative period since the last unsteady commit to force flush the data buffers to disk, for non-sync durability modes.
unsigned mdbx::env::sync_period__seconds_16dot16 () const
 Gets relative period since the last unsteady commit that used to force flush the data buffers to disk, for non-sync durability modes.
env & mdbx::env::set_sync_period__seconds_double (double seconds)
 Sets relative period since the last unsteady commit to force flush the data buffers to disk, for non-sync durability modes.
double mdbx::env::sync_period__seconds_double () const
 Gets relative period since the last unsteady commit that used to force flush the data buffers to disk, for non-sync durability modes.
env & mdbx::env::set_extra_option (extra_runtime_option option, uint64_t value)
 Sets the value of a extra runtime options for an environment.
uint64_t mdbx::env::extra_option (extra_runtime_option option) const
 Gets the value of extra runtime options from an environment.
env & mdbx::env::alter_flags (MDBX_env_flags_t flags, bool on_off)
 Alter environment flags.
env & mdbx::env::set_geometry (const geometry &size)
 Set all size-related parameters of environment.
bool mdbx::env::sync_to_disk (bool force=true, bool nonblock=false)
 Flush the environment data buffers.
void mdbx::env::close_map (const map_handle &)
 Close a key-value map (aka table) handle. Normally unnecessary.
constexpr mdbx::env::reader_info::reader_info (int slot, mdbx_pid_t pid, mdbx_tid_t thread, uint64_t txnid, uint64_t lag, size_t used, size_t retained) noexcept
template<typename VISITOR>
int mdbx::env::enumerate_readers (VISITOR &visitor)
 Enumerate readers.
unsigned mdbx::env::check_readers ()
 Checks for stale readers in the lock table and return number of cleared slots.
MDBX_NODISCARD MDBX_chk_context_t & mdbx::env::chk (MDBX_chk_context_t &ctx, const MDBX_chk_callbacks_t *cb=nullptr, MDBX_chk_flags_t flags=MDBX_CHK_DEFAULTS, MDBX_chk_severity_t verbosity=MDBX_chk_info, unsigned timeout_seconds_16dot16=0) const
 Checks the integrity of the environment (database).
static MDBX_NODISCARD sysraminfo mdbx::env::get_sysraminfo ()
 Returns information about the system RAM.
static MDBX_NODISCARD info mdbx::env::get_preopen_snapinfo (const ::std::string &pathname)
 Provides information about a database, including meta-page and geometry, without opening it.
static MDBX_NODISCARD info mdbx::env::get_preopen_snapinfo (const char *pathname)
static MDBX_NODISCARD info mdbx::env::get_preopen_snapinfo (const ::mdbx::filesystem::path &pathname)
void mdbx::env::thread_register ()
 Registers the current thread as a reader for the environment, i.e. assigns a reader slot.
void mdbx::env::thread_unregister ()
 Unregisters the current thread, i.e. releases its reader slot.
MDBX_NODISCARD int mdbx::env::warmup (MDBX_warmup_flags_t flags, unsigned timeout_seconds_16dot16, const MDBX_txn *txn=nullptr) const
 Loads into memory the given pages of the database and their on-disk neighbours in advance.
void mdbx::env::resurrect_after_fork ()
 Restores the environment after fork(), dropping all read-write locks and reader slots of the parent process.
void mdbx::env::turn_for_recovery (unsigned target_meta)
 Turns the database to the specified meta-page.
env & mdbx::env::set_HandleSlowReaders (MDBX_hsr_func)
 Sets a Handle-Slow-Readers callback to resolve database full/overflow issue due to a reader(s) which prevents the old data from being recycled.
MDBX_hsr_func mdbx::env::get_HandleSlowReaders () const noexcept
 Returns the current Handle-Slow-Readers callback used to resolve database full/overflow issue due to a reader(s) which prevents the old data from being recycled.
txn_managed mdbx::env::start_read () const
 Starts read (read-only) transaction.
txn_managed mdbx::env::prepare_read () const
 Creates but not start read transaction.
txn_managed mdbx::env::start_write (bool dont_wait=false)
 Starts write (read-write) transaction.
txn_managed mdbx::env::start_write (txn &parent)
 Starts write (read-write) transaction.
txn_managed mdbx::env::try_start_write ()
 Tries to start write (read-write) transaction without blocking.
bool mdbx::env::txn_lock (bool dont_wait=false)
 Acquires write-transaction lock.
void mdbx::env::txn_unlock ()
 Releases write-transaction lock acquired by txn_lock().
template<typename VISITOR>
defrag_result mdbx::env::defrag (VISITOR &visitor, size_t defrag_atleast=0, size_t time_atleast_dot16=0, size_t defrag_enough=0, size_t time_limit_dot16=0, intptr_t acceptable_backlash=-1, intptr_t preferred_batch=0)
 Performs database defragmentation.
defrag_result mdbx::env::defrag (size_t defrag_atleast=0, size_t time_atleast_dot16=0, size_t defrag_enough=0, size_t time_limit_dot16=0, intptr_t acceptable_backlash=-1, intptr_t preferred_batch=0)
 Performs database defragmentation without a progress visitor.
constexpr mdbx::txn::txn (MDBX_txn *ptr) noexcept
txn & mdbx::txn::operator= (txn &&) noexcept
 mdbx::txn::txn (txn &&) noexcept
 mdbx::txn::~txn () noexcept
void * mdbx::txn::get_context () const noexcept
 Returns the application context associated with the transaction.
txn & mdbx::txn::set_context (void *your_context)
 Sets the application context associated with the transaction.
bool mdbx::txn::is_dirty (const void *ptr) const
 Checks whether the given data is on a dirty page.
inline ::mdbx::env mdbx::txn::env () const noexcept
 Returns the transaction's environment.
MDBX_txn_flags_t mdbx::txn::flags () const
 Returns transaction's flags.
uint64_t mdbx::txn::id () const
 Return the transaction's ID.
void mdbx::txn::reset_reading ()
 Reset read-only transaction.
void mdbx::txn::make_broken ()
 Marks transaction as broken to prevent further operations.
void mdbx::txn::renew_reading ()
 Renew read-only transaction.
bool mdbx::txn::refresh ()
 Refresh the read-only transaction to the most recent snapshot.
void mdbx::txn::copy (const char *destination, bool compactify, bool force_dynamic_size=false)
 Copy an MVCC-snapshot of the database to the destination path.
void mdbx::txn::copy (const ::std::string &destination, bool compactify, bool force_dynamic_size=false)
 Copy an MVCC-snapshot of the database to the destination path.
void mdbx::txn::copy (const ::mdbx::filesystem::path &destination, bool compactify, bool force_dynamic_size=false)
 Copy an MVCC-snapshot of the database to the destination path.
void mdbx::txn::copy (filehandle fd, bool compactify, bool force_dynamic_size=false)
 Copy an MVCC-snapshot of the database to the given file handle.
txn_managed mdbx::txn::clone (void *context=nullptr) const
 Clone read transaction.
void mdbx::txn::clone (txn_managed &txn_for_renew_into_clone, void *context=nullptr) const
 Renew given read transaction into clone.
void mdbx::txn::park_reading (bool autounpark=true)
 Park read-only transaction.
bool mdbx::txn::unpark_reading (bool restart_if_ousted=true)
 Resume parked read-only transaction.
info mdbx::txn::get_info (bool scan_reader_lock_table=false) const
 Returns information about the MDBX transaction.
cursor_managed mdbx::txn::open_cursor (map_handle map) const
 Opens cursor for specified key-value map handle.
size_t mdbx::txn::release_all_cursors (bool unbind) const
 Unbind or close all cursors.
map_handle mdbx::txn::open_map (const slice &name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single) const
 Open existing key-value map.
map_handle mdbx::txn::open_map (const char *name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single) const
 Open existing key-value map.
map_handle mdbx::txn::open_map_accede (const slice &name) const
 Open existing key-value map.
map_handle mdbx::txn::open_map_accede (const char *name) const
 Open existing key-value map.
map_handle mdbx::txn::create_map (const slice &name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single)
 Create new or open existing key-value map.
map_handle mdbx::txn::create_map (const char *name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single)
 Create new or open existing key-value map.
void mdbx::txn::drop_map (map_handle map)
 Drops key-value map using handle.
void mdbx::txn::clear_map (map_handle map)
 Clear key-value map.
void mdbx::txn::rename_map (map_handle map, const char *new_name)
 Переименовывает таблицу ключ-значение.
void mdbx::txn::rename_map (map_handle map, const slice &new_name)
 Переименовывает таблицу ключ-значение.
map_handle mdbx::txn::open_map (const ::std::string &name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single) const
 Open existing key-value map.
map_handle mdbx::txn::open_map_accede (const ::std::string &name) const
 Open existing key-value map.
map_handle mdbx::txn::create_map (const ::std::string &name, const ::mdbx::key_mode key_mode=::mdbx::key_mode::usual, const ::mdbx::value_mode value_mode=::mdbx::value_mode::single)
 Create new or open existing key-value map.
bool mdbx::txn::drop_map (const ::std::string &name, bool throw_if_absent=false)
 Drop key-value map.
bool mdbx::txn::clear_map (const ::std::string &name, bool throw_if_absent=false)
void mdbx::txn::rename_map (map_handle map, const ::std::string &new_name)
 Переименовывает таблицу ключ-значение.
map_stat mdbx::txn::get_map_stat (map_handle map) const
 Returns statistics for a table.
uint32_t mdbx::txn::get_tree_deepmask (map_handle map) const
 Returns depth (bitmask) information of nested dupsort (multi-value) B+trees for given table.
map_handle::info mdbx::txn::get_map_flags (map_handle map) const
 Returns information about key-value map (aka table) handle.
template<typename VISITOR>
int mdbx::txn::enumerate_tables (VISITOR &visitor) const
 Enumerates user's named tables in a database.
template<typename VISITOR>
gc_info mdbx::txn::get_gc_info (VISITOR &visitor) const
 Provides information of Garbage Collection and page usage.
gc_info mdbx::txn::get_gc_info () const
txn & mdbx::txn::put_canary (const canary &)
 Set integers markers (aka "canary") associated with the environment.
canary mdbx::txn::get_canary () const
 Returns the four integer markers (aka "canary") associated with the environment.
uint64_t mdbx::txn::sequence (map_handle map) const
 Reads sequence generator associated with a key-value map (aka table).
uint64_t mdbx::txn::sequence (map_handle map, uint64_t increment)
 Reads and increment sequence generator associated with a key-value map (aka table).
int mdbx::txn::compare_keys (map_handle map, const slice &a, const slice &b) const noexcept
 Compare two keys according to a particular key-value map (aka table).
int mdbx::txn::compare_values (map_handle map, const slice &a, const slice &b) const noexcept
 Compare two values according to a particular key-value map (aka table).
int mdbx::txn::compare_keys (map_handle map, const pair &a, const pair &b) const noexcept
 Compare keys of two pairs according to a particular key-value map (aka table).
int mdbx::txn::compare_values (map_handle map, const pair &a, const pair &b) const noexcept
 Compare values of two pairs according to a particular key-value map(aka table).
slice mdbx::txn::get (map_handle map, const slice &key) const
 Get value by key from a key-value map (aka table).
MDBX_NODISCARD cache_result mdbx::txn::get_cached (map_handle map, const slice &key, slice *data, cache_entry &entry) const
 Gets a value by key using the transparent read-your-writes cache.
MDBX_NODISCARD slice mdbx::txn::get_cached (map_handle map, const slice &key, cache_entry &entry, cache_status *status=nullptr) const
 Gets a value by key using the transparent read-your-writes cache, throwing exceptions on errors.
slice mdbx::txn::get (map_handle map, slice key, size_t &values_count) const
 Get first of multi-value and values count by key from a key-value multimap (aka table).
slice mdbx::txn::get (map_handle map, const slice &key, const slice &value_at_absence) const
 Get value by key from a key-value map (aka table).
slice mdbx::txn::get (map_handle map, slice key, size_t &values_count, const slice &value_at_absence) const
 Get first of multi-value and values count by key from a key-value multimap (aka table).
pair_result mdbx::txn::get_equal_or_great (map_handle map, const slice &key) const
 Gets the value for an equal or greater key from a table.
pair_result mdbx::txn::get_equal_or_great (map_handle map, const slice &key, const slice &value_at_absence) const
 Gets the value for an equal or greater key from a table.
MDBX_error_t mdbx::txn::put (map_handle map, const slice &key, slice *value, MDBX_put_flags_t flags) noexcept
void mdbx::txn::put (map_handle map, const slice &key, slice value, put_mode mode)
void mdbx::txn::insert (map_handle map, const slice &key, slice value)
value_result mdbx::txn::try_insert (map_handle map, const slice &key, slice value)
slice mdbx::txn::insert_reserve (map_handle map, const slice &key, size_t value_length)
value_result mdbx::txn::try_insert_reserve (map_handle map, const slice &key, size_t value_length)
void mdbx::txn::upsert (map_handle map, const slice &key, const slice &value)
slice mdbx::txn::upsert_reserve (map_handle map, const slice &key, size_t value_length)
void mdbx::txn::update (map_handle map, const slice &key, const slice &value)
bool mdbx::txn::try_update (map_handle map, const slice &key, const slice &value)
slice mdbx::txn::update_reserve (map_handle map, const slice &key, size_t value_length)
value_result mdbx::txn::try_update_reserve (map_handle map, const slice &key, size_t value_length)
bool mdbx::txn::erase (map_handle map, const slice &key)
 Removes all values for given key.
bool mdbx::txn::erase (map_handle map, const slice &key, const slice &value)
 Removes the particular multi-value entry of the key.
void mdbx::txn::replace (map_handle map, const slice &key, slice &old_value, const slice &new_value)
 Replaces the particular multi-value of the key with a new value.
template<class BUFFER, class ALLOCATOR = typename BUFFER::allocator_type>
BUFFER mdbx::txn::extract (map_handle map, const slice &key, const ALLOCATOR &alloc=ALLOCATOR())
 Removes and return a value of the key.
template<class BUFFER, class ALLOCATOR = typename BUFFER::allocator_type>
BUFFER mdbx::txn::replace (map_handle map, const slice &key, const slice &new_value, const ALLOCATOR &alloc=ALLOCATOR())
 Replaces and returns a value of the key with new one.
template<class BUFFER, class ALLOCATOR = typename BUFFER::allocator_type>
BUFFER mdbx::txn::replace_reserve (map_handle map, const slice &key, size_t length, slice &new_value_reservation, const ALLOCATOR &alloc=ALLOCATOR())
void mdbx::txn::append (map_handle map, const slice &key, const slice &value, bool multivalue_order_preserved=true)
 Adding a key-value pair, provided that ascending order of the keys and (optionally) values are preserved.
size_t mdbx::txn::put_multiple_samelength (map_handle map, const slice &key, const size_t value_length, const void *values_array, size_t values_count, put_mode mode, bool allow_partial=false)
ptrdiff_t mdbx::txn::estimate (map_handle map, const pair &from, const pair &to) const
ptrdiff_t mdbx::txn::estimate (map_handle map, const slice &from, const slice &to) const
ptrdiff_t mdbx::txn::estimate_from_first (map_handle map, const slice &to) const
ptrdiff_t mdbx::txn::estimate_to_last (map_handle map, const slice &from) const
constexpr mdbx::cursor::cursor (MDBX_cursor *ptr) noexcept
cursor & mdbx::cursor::assign (const cursor &)
cursor & mdbx::cursor::operator= (cursor &&) noexcept
 mdbx::cursor::cursor (cursor &&) noexcept
 mdbx::cursor::~cursor () noexcept
void * mdbx::cursor::get_context () const noexcept
 Returns the application context associated with the cursor.
cursor & mdbx::cursor::set_context (void *your_context)
 Sets the application context associated with the cursor.
 mdbx::cursor::move_result::move_result (const cursor &cursor, bool throw_notfound)
 mdbx::cursor::move_result::move_result (cursor &cursor, move_operation operation, const slice &key, const slice &value, bool throw_notfound)
bool mdbx::cursor::move (move_operation operation, MDBX_val *key, MDBX_val *value, bool throw_notfound) const
 mdbx::cursor::estimate_result::estimate_result (const cursor &cursor, move_operation operation, const slice &key, const slice &value)
ptrdiff_t mdbx::cursor::estimate (move_operation operation, MDBX_val *key, MDBX_val *value) const
move_result mdbx::cursor::find (const slice &key, bool throw_notfound=true)
move_result mdbx::cursor::lower_bound (const slice &key, bool throw_notfound=false)
move_result mdbx::cursor::upper_bound (const slice &key, bool throw_notfound=false)
move_result mdbx::cursor::find_multivalue (const slice &key, const slice &value, bool throw_notfound=true)
move_result mdbx::cursor::lower_bound_multivalue (const slice &key, const slice &value, bool throw_notfound=false)
move_result mdbx::cursor::upper_bound_multivalue (const slice &key, const slice &value, bool throw_notfound=false)
bool mdbx::cursor::seek (const slice &key)
size_t mdbx::cursor::count_multivalue () const
 Return count of duplicates for current key.
size_t mdbx::cursor::count_multivalue (MDBX_stat *stat) const
 Return count of duplicates for current key, along with basic statistics of the table.
inline ::std::vector< pair > mdbx::cursor::get_batch (size_t max_pairs, move_operation op, bool *is_last=nullptr) const
 Reads a batch of key-value pairs.
void mdbx::cursor::ignore_key_order ()
 Disables the control of the order of keys when reading database pages for this cursor.
bool mdbx::cursor::eof () const
bool mdbx::cursor::on_first () const
bool mdbx::cursor::on_last () const
bool mdbx::cursor::on_first_multival () const
bool mdbx::cursor::on_last_multival () const
estimate_result mdbx::cursor::estimate (const slice &key, const slice &value) const
estimate_result mdbx::cursor::estimate (const slice &key) const
estimate_result mdbx::cursor::estimate (move_operation operation) const
estimate_result mdbx::cursor::estimate (move_operation operation, const slice &key) const
void mdbx::cursor::renew (::mdbx::txn &txn)
 Renew/bind a cursor with a new transaction and previously used key-value map handle.
void mdbx::cursor::bind (::mdbx::txn &txn, ::mdbx::map_handle map_handle)
 Bind/renew a cursor with a new transaction and specified key-value map handle.
void mdbx::cursor::unbind ()
 Unbind cursor from a transaction.
inline ::mdbx::txn mdbx::cursor::txn () const
 Returns the cursor's transaction.
map_handle mdbx::cursor::map () const
MDBX_error_t mdbx::cursor::put (const slice &key, slice *value, MDBX_put_flags_t flags) noexcept
void mdbx::cursor::put (const slice &key, slice value, put_mode mode)
void mdbx::cursor::insert (const slice &key, slice value)
value_result mdbx::cursor::try_insert (const slice &key, slice value)
slice mdbx::cursor::insert_reserve (const slice &key, size_t value_length)
value_result mdbx::cursor::try_insert_reserve (const slice &key, size_t value_length)
void mdbx::cursor::upsert (const slice &key, const slice &value)
slice mdbx::cursor::upsert_reserve (const slice &key, size_t value_length)
void mdbx::cursor::update (const slice &key, const slice &value)
bool mdbx::cursor::try_update (const slice &key, const slice &value)
slice mdbx::cursor::update_reserve (const slice &key, size_t value_length)
value_result mdbx::cursor::try_update_reserve (const slice &key, size_t value_length)
bool mdbx::cursor::erase (bool whole_multivalue=false)
 Removes single key-value pair or all multi-values at the current cursor position.
bool mdbx::cursor::erase (const slice &key, bool whole_multivalue=true)
 Seeks and removes first value or whole multi-value of the given key.
bool mdbx::cursor::erase (const slice &key, const slice &value)
 Seeks and removes the particular multi-value entry of the key.
size_t mdbx::cursor::erase_bunch (bunch_delete action)
 Quickly removes bunches of neighboring items much faster by cutting out entire pages and branches from the B+ tree structure.
size_t mdbx::cursor::erase_range (const cursor &end, bool end_including)
 Quickly removes a range of items between the current cursor position and the position of end much faster by cutting out entire pages and branches from the B+ tree structure.
void mdbx::cursor::reset ()
 Resets the cursor state.
size_t mdbx::cursor::put_multiple_samelength (const slice &key, const size_t value_length, const void *values_array, size_t values_count, put_mode mode, bool allow_partial=false)
static ptrdiff_t mdbx::cursor::distance_between (const cursor from, const cursor to, unsigned deepness=42)
bool mdbx::cursor::scroll (intptr_t distable, unsigned deepness=42, bool throw_notfound=true)
static bool mdbx::cursor::distribute (const cursor from, const cursor to, cursor *cursors_array, intptr_t cursors_array_size, unsigned deepness=42)
static bool mdbx::cursor::distribute (const cursor from, const cursor to, const std::vector< cursor > &cursors, unsigned deepness=42)
static bool mdbx::cursor::distribute (const cursor from, const cursor to, const std::vector< cursor_managed > &cursors, unsigned deepness=42)

Variables

template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
class MDBX_MSVC_DECLSPEC_EMPTY_BASES mdbx::buffer

Detailed Description

Macro Definition Documentation

◆ MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR

#define MDBX_CXX_HAS_POLYMORPHIC_ALLOCATOR   1

Defined as 1 if the mdbx::polymorphic_allocator is available.

See also
The <memory_resource> Standard C++17 library header

◆ MDBX_STD_FILESYSTEM_PATH

#define MDBX_STD_FILESYSTEM_PATH   ::mdbx::filesystem::path

Defined if mdbx::filesystem::path is available.

If defined, it is always mdbx::filesystem::path, which in turn can refer to std::filesystem::path or std::experimental::filesystem::path. Nonetheless MDBX_STD_FILESYSTEM_PATH is not defined if the mdbx::path falls back to a plain std::string or std::wstring.

Typedef Documentation

◆ buffer_pair

template<typename BUFFER>
using mdbx::buffer_pair = buffer_pair_spec<typename BUFFER::allocator_type, typename BUFFER::reservation_policy>

Combines pair of buffers for key and value to hold an operands for certain operations.

◆ build_info

libmdbx build information

Attention
Some strings could be NULL in case no corresponding information was provided at build time (i.e. flags).

◆ byte

using mdbx::byte = char8_t

The byte-like type that don't presumes aliases for pointers as does the char.

Essentially, to enable all kinds of an compiler optimization, we need just the unsigned char * restrict type in C99 terms, i.e. the non-aliasing pointer to unsigned char. However, C++ still doesn't have restrict keyword not non-aliases type attribute, but a char-pointers may be aliased.

On the other hand, while uint8_t is provided and CHAR_BIT = 8 the char8_t * actually act the same as the C99 unsigned char * restrict. So using char8_t should not be an issue, since both the CHAR_BIT = 8 and uint8_t are required.

At the same time, the approach of using char8_t has several advantages:

  • the restrict attribute is defined on level of the base type and is inherited by any derived pointer type;
  • some compilers treat __restrict as an attribute of an instance of a type (i.e. a variable, a specific pointer), but not a type attribute.

Nonetheless, I should think about switching to the uint8_t * __restrict__ for byte pointers.

Note
Functions whose signature depends on the mdbx::byte type must be strictly defined as inline!

◆ default_allocator

◆ default_buffer

◆ default_buffer_pair

Default pair of buffers.

◆ duration

using mdbx::duration = ::std::chrono::duration<unsigned, ::std::ratio<1, 65536>>

Duration in 1/65536 units of second.

◆ filehandle

◆ legacy_allocator

using mdbx::legacy_allocator = ::std::string::allocator_type

Legacy allocator but it is recommended to use polymorphic_allocator.

◆ path

using mdbx::path = ::mdbx::filesystem::path

◆ path_char

using mdbx::path_char = path_string::value_type

◆ path_string

using mdbx::path_string = ::mdbx::filesystem::path::string_type

◆ polymorphic_allocator

using mdbx::polymorphic_allocator = ::std::pmr::string::allocator_type

Default polymorphic allocator for modern code.

◆ string

template<class ALLOCATOR = default_allocator>
using mdbx::string = ::std::basic_string<char, ::std::char_traits<char>, ALLOCATOR>

Default single-byte string.

◆ txnid

using mdbx::txnid = uint64_t

Transaction ID and MVCC-snapshot number.

◆ version_info

libmdbx version information,

See also
https://semver.org/

Function Documentation

◆ buffer() [1/2]

template<class ALLOCATOR, typename CAPACITY_POLICY>
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::buffer ( const struct slice & src,
bool make_reference,
const allocator_type & alloc = allocator_type() )
constexpr

◆ buffer() [2/2]

template<class ALLOCATOR, typename CAPACITY_POLICY>
template<class ALLOCATOR, typename CAPACITY_POLICY>
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::buffer ( const txn & transaction,
const struct slice & src,
const allocator_type & alloc )
inline

◆ cursor() [1/2]

mdbx::cursor::cursor ( cursor && other)
inlinenoexcept

◆ cursor() [2/2]

mdbx::cursor::cursor ( MDBX_cursor * ptr)
constexprnoexcept

◆ env() [1/3]

mdbx::env::env ( env && other)
inlinenoexcept

◆ env() [2/3]

mdbx::env::env ( MDBX_env * ptr)
constexprprotectednoexcept

◆ error()

mdbx::error::error ( MDBX_error_t error_code)
constexprnoexcept

◆ estimate_result()

mdbx::cursor::estimate_result::estimate_result ( const cursor & cursor,
move_operation operation,
const slice & key,
const slice & value )
inline

◆ info()

mdbx::map_handle::info::info ( map_handle::flags flags,
map_handle::state state )
constexprnoexcept

◆ move_result() [1/2]

mdbx::cursor::move_result::move_result ( const cursor & cursor,
bool throw_notfound )
inline

◆ move_result() [2/2]

mdbx::cursor::move_result::move_result ( cursor & cursor,
move_operation operation,
const slice & key,
const slice & value,
bool throw_notfound )
inline

◆ reader_info()

mdbx::env::reader_info::reader_info ( int slot,
mdbx_pid_t pid,
mdbx_tid_t thread,
uint64_t txnid,
uint64_t lag,
size_t used,
size_t retained )
constexprnoexcept

◆ slice() [1/7]

mdbx::slice::slice ( )
constexprnoexcept

Create an empty slice.

◆ slice() [2/7]

mdbx::slice::slice ( const char * c_str)
explicitconstexpr

Create a slice that refers to c_str[0,strlen(c_str)-1].

◆ slice() [3/7]

mdbx::slice::slice ( const MDBX_val & src)
constexpr

◆ slice() [4/7]

mdbx::slice::slice ( const void * begin,
const void * end )
constexpr

Create a slice that refers to [begin,end] of memory bytes.

◆ slice() [5/7]

mdbx::slice::slice ( const void * ptr,
size_t bytes )
constexpr

Create a slice that refers to [0,bytes-1] of memory bytes pointed by ptr.

◆ slice() [6/7]

mdbx::slice::slice ( MDBX_val && src)
constexpr

◆ slice() [7/7]

mdbx::slice::slice ( slice && src)
constexprnoexcept

◆ txn() [1/3]

mdbx::txn::txn ( MDBX_txn * ptr)
constexprprotectednoexcept

◆ txn() [2/3]

mdbx::txn::txn ( txn && other)
inlinenoexcept

◆ ~cursor()

mdbx::cursor::~cursor ( )
inlinenoexcept

◆ ~env()

mdbx::env::~env ( )
inlinenoexcept

◆ ~txn()

mdbx::txn::~txn ( )
inlinenoexcept

◆ alter_flags()

env & mdbx::env::alter_flags ( MDBX_env_flags_t flags,
bool on_off )
inline

Alter environment flags.

◆ append()

void mdbx::txn::append ( map_handle map,
const slice & key,
const slice & value,
bool multivalue_order_preserved = true )
inline

Adding a key-value pair, provided that ascending order of the keys and (optionally) values are preserved.

Instead of splitting the full b+tree pages, the data will be placed on new ones. Thus appending is about two times faster than insertion, and the pages will be filled in completely mostly but not half as after splitting ones. On the other hand, any subsequent insertion or update with an increase in the length of the value will be twice as slow, since it will require splitting already filled pages.

Parameters
[in]mapA map handle to append
[in]keyA key to be append
[in]valueA value to store with the key
[in]multivalue_order_preservedIf multivalue_order_preserved == true then the same rules applied for to pages of nested b+tree of multimap's values.

◆ as_base58_string()

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::slice::as_base58_string ( unsigned wrap_width = 0,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Returns a string with a Base58 dump of the slice content.

◆ as_base64_string()

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::slice::as_base64_string ( unsigned wrap_width = 0,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Returns a string with a Base64 dump of the slice content.

◆ as_buffer() [1/6]

template<class ALLOCATOR, typename CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::from_base58::as_buffer ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Decodes Base58 dump from a passed slice to returned buffer.

◆ as_buffer() [2/6]

template<class ALLOCATOR, typename CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::from_base64::as_buffer ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Decodes Base64 dump from a passed slice to returned buffer.

◆ as_buffer() [3/6]

template<class ALLOCATOR, typename CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::from_hex::as_buffer ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Decodes hexadecimal dump from a passed slice to returned buffer.

◆ as_buffer() [4/6]

template<class ALLOCATOR, typename CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::to_base58::as_buffer ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Returns a buffer with a Base58 dump of a passed slice.

◆ as_buffer() [5/6]

template<class ALLOCATOR, typename CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::to_base64::as_buffer ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Returns a buffer with a Base64 dump of a passed slice.

◆ as_buffer() [6/6]

template<class ALLOCATOR, typename CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::to_hex::as_buffer ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Returns a buffer with a hexadecimal dump of a passed slice.

◆ as_hex_string()

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::slice::as_hex_string ( bool uppercase = false,
unsigned wrap_width = 0,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Returns a string with a hexadecimal dump of the slice content.

◆ as_string() [1/6]

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::from_base58::as_string ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Decodes Base58 dump from a passed slice to returned string.

◆ as_string() [2/6]

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::from_base64::as_string ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Decodes Base64 dump from a passed slice to returned string.

◆ as_string() [3/6]

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::from_hex::as_string ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Decodes hexadecimal dump from a passed slice to returned string.

◆ as_string() [4/6]

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::to_base58::as_string ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Returns a string with a Base58 dump of a passed slice.

◆ as_string() [5/6]

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::to_base64::as_string ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Returns a string with a Base64 dump of a passed slice.

◆ as_string() [6/6]

template<class ALLOCATOR>
string< ALLOCATOR > mdbx::to_hex::as_string ( const ALLOCATOR & alloc = ALLOCATOR()) const
inline

Returns a string with a hexadecimal dump of a passed slice.

◆ assign() [1/8]

cursor & mdbx::cursor::assign ( const cursor & src)
inline

◆ assign() [2/8]

slice & mdbx::slice::assign ( ::MDBX_val && src)
inline

◆ assign() [3/8]

slice & mdbx::slice::assign ( const ::MDBX_val & src)
inline

◆ assign() [4/8]

slice & mdbx::slice::assign ( const char * c_str)
inline

◆ assign() [5/8]

slice & mdbx::slice::assign ( const slice & src)
inlinenoexcept

◆ assign() [6/8]

slice & mdbx::slice::assign ( const void * begin,
const void * end )
inline

◆ assign() [7/8]

slice & mdbx::slice::assign ( const void * ptr,
size_t bytes )
inline

◆ assign() [8/8]

slice & mdbx::slice::assign ( slice && src)
inlinenoexcept

◆ at()

byte mdbx::slice::at ( size_t n) const
constexpr

Returns the nth byte in the referenced data with bounds checking.

Exceptions
std::out_of_rangeif n >= size()

◆ base58_decode()

template<class ALLOCATOR, class CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::base58_decode ( bool ignore_spaces = false,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Decodes Base58 dump from the slice content to returned buffer.

◆ base64_decode()

template<class ALLOCATOR, class CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::base64_decode ( bool ignore_spaces = false,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Decodes Base64 dump from the slice content to returned buffer.

◆ begin() [1/2]

const byte * mdbx::slice::begin ( ) const
constexprnoexcept

Returns an iterator to the beginning of the referenced data.

◆ begin() [2/2]

byte * mdbx::slice::begin ( )
constexprnoexcept

Returns an iterator to the beginning of the referenced data.

◆ bind()

void mdbx::cursor::bind ( ::mdbx::txn & txn,
::mdbx::map_handle map_handle )
inline

Bind/renew a cursor with a new transaction and specified key-value map handle.

◆ boolean_or_throw() [1/2]

bool mdbx::error::boolean_or_throw ( int error_code)
inlinestatic

◆ boolean_or_throw() [2/2]

bool mdbx::error::boolean_or_throw ( int error_code,
const exception_thunk & thunk )
inlinestatic

◆ byte_ptr() [1/2]

const byte * mdbx::slice::byte_ptr ( ) const
constexprnoexcept

Returns casted to pointer to byte an address of data.

◆ byte_ptr() [2/2]

byte * mdbx::slice::byte_ptr ( )
constexprnoexcept

◆ capture()

void mdbx::exception_thunk::capture ( )
inlinenoexcept

◆ char_ptr() [1/2]

const char * mdbx::slice::char_ptr ( ) const
constexprnoexcept

Returns casted to pointer to char an address of data.

◆ char_ptr() [2/2]

char * mdbx::slice::char_ptr ( )
constexprnoexcept

◆ check_readers()

unsigned mdbx::env::check_readers ( )
inline

Checks for stale readers in the lock table and return number of cleared slots.

◆ chk()

MDBX_chk_context_t & mdbx::env::chk ( MDBX_chk_context_t & ctx,
const MDBX_chk_callbacks_t * cb = nullptr,
MDBX_chk_flags_t flags = MDBX_CHK_DEFAULTS,
MDBX_chk_severity_t verbosity = MDBX_chk_info,
unsigned timeout_seconds_16dot16 = 0 ) const
inline

Checks the integrity of the environment (database).

Performs a full consistency check of the database with interactive callbacks, see mdbx_env_chk(). The caller provides an MDBX_chk_context_t context where the results of the check are generated (ctx.result), and optionally a set of callbacks (cb, all fields may be nullptr).

Note
The API is not frozen yet and may be improved in future versions.
Parameters
[in,out]ctxA zero-initialized context of the check, where the results are generated. Pointers in ctx.result (e.g. tables) remain valid until the next check or close of the environment.
[in]cbA set of callback functions, all optional. nullptr means no callbacks.
[in]flagsFlags/options of the check, MDBX_chk_flags_t.
[in]verbosityThe required detail level of progress and results.
[in]timeout_seconds_16dot16Duration limit of the check in 1/65536 fractions of a second, zero means no limit.
Returns
The reference to the ctx for chaining.
Exceptions
mdbx::erroron failure.
See also
mdbx_env_chk()

◆ clear()

void mdbx::slice::clear ( )
constexprnoexcept

Makes the slice empty and referencing to nothing.

◆ clear_map() [1/2]

bool mdbx::txn::clear_map ( const ::std::string & name,
bool throw_if_absent = false )
inline
Returns
True if the key-value map existed and was cleared, either false if the key-value map did not exist and there is nothing to clear.

◆ clear_map() [2/2]

void mdbx::txn::clear_map ( map_handle map)
inline

Clear key-value map.

◆ clone() [1/2]

void mdbx::txn::clone ( txn_managed & txn_for_renew_into_clone,
void * context = nullptr ) const
inline

Renew given read transaction into clone.

◆ clone() [2/2]

txn_managed mdbx::txn::clone ( void * context = nullptr) const
inline

Clone read transaction.

◆ close_map()

void mdbx::env::close_map ( const map_handle & handle)
inline

Close a key-value map (aka table) handle. Normally unnecessary.

Closing a table handle is not necessary, but lets txn::open_map() reuse the handle value. Usually it's better to set a bigger env::operate_parameters::max_maps, unless that value would be large.

Note
Use with care. This call is synchronized via mutex with other calls close_map(), but NOT with other transactions running by other threads. The "next" version of libmdbx (MithrilDB and Future) will solve this issue.

Handles should only be closed if no other threads are going to reference the table handle or one of its cursors any further. Do not close a handle if an existing transaction has modified its table. Doing so can cause misbehavior from database corruption to errors like MDBX_BAD_DBI (since the DB name is gone).

◆ code()

MDBX_error_t mdbx::error::code ( ) const
constexprnoexcept

Returns error code.

◆ compare_fast() [1/2]

intptr_t mdbx::pair::compare_fast ( const pair & a,
const pair & b )
staticconstexprnoexcept

Three-way fast non-lexicographically length-based comparison.

◆ compare_fast() [2/2]

intptr_t mdbx::slice::compare_fast ( const slice & a,
const slice & b )
staticconstexprnoexcept

Three-way fast non-lexicographically length-based comparison.

Firstly compares length and if it equal then compare content lexicographically.

Returns
value: == 0 if a the same as b; < 0 if a shorter than b, or the same length and lexicographically less than b; > 0 if a longer than b, or the same length and lexicographically greater than b.

◆ compare_keys() [1/2]

int mdbx::txn::compare_keys ( map_handle map,
const pair & a,
const pair & b ) const
inlinenoexcept

Compare keys of two pairs according to a particular key-value map (aka table).

◆ compare_keys() [2/2]

int mdbx::txn::compare_keys ( map_handle map,
const slice & a,
const slice & b ) const
inlinenoexcept

Compare two keys according to a particular key-value map (aka table).

◆ compare_lexicographically() [1/2]

intptr_t mdbx::pair::compare_lexicographically ( const pair & a,
const pair & b )
staticconstexprnoexcept

Three-way lexicographically comparison.

◆ compare_lexicographically() [2/2]

intptr_t mdbx::slice::compare_lexicographically ( const slice & a,
const slice & b )
staticconstexprnoexcept

Three-way lexicographically comparison.

Returns
value: == 0 if a lexicographically equal b; < 0 if a lexicographically less than b; > 0 if a lexicographically greater than b.

◆ compare_position()

int mdbx::compare_position ( const cursor & left,
const cursor & right,
bool ignore_nested = false )
inline

◆ compare_position_nothrow()

int mdbx::compare_position_nothrow ( const cursor & left,
const cursor & right,
bool ignore_nested = false )
inlinenoexcept

◆ compare_values() [1/2]

int mdbx::txn::compare_values ( map_handle map,
const pair & a,
const pair & b ) const
inlinenoexcept

Compare values of two pairs according to a particular key-value map(aka table).

◆ compare_values() [2/2]

int mdbx::txn::compare_values ( map_handle map,
const slice & a,
const slice & b ) const
inlinenoexcept

Compare two values according to a particular key-value map (aka table).

◆ copy() [1/4]

void mdbx::txn::copy ( const ::mdbx::filesystem::path & destination,
bool compactify,
bool force_dynamic_size = false )
inline

Copy an MVCC-snapshot of the database to the destination path.

Copies the consistent state as seen by this transaction, see mdbx_txn_copy2pathname().

See also
env::copy()

◆ copy() [2/4]

void mdbx::txn::copy ( const ::std::string & destination,
bool compactify,
bool force_dynamic_size = false )
inline

Copy an MVCC-snapshot of the database to the destination path.

Copies the consistent state as seen by this transaction, see mdbx_txn_copy2pathname().

See also
env::copy()

◆ copy() [3/4]

void mdbx::txn::copy ( const char * destination,
bool compactify,
bool force_dynamic_size = false )
inline

Copy an MVCC-snapshot of the database to the destination path.

Copies the consistent state as seen by this transaction, see mdbx_txn_copy2pathname().

See also
env::copy()

◆ copy() [4/4]

void mdbx::txn::copy ( filehandle fd,
bool compactify,
bool force_dynamic_size = false )
inline

Copy an MVCC-snapshot of the database to the given file handle.

See also
mdbx_txn_copy2fd()

◆ count_multivalue() [1/2]

size_t mdbx::cursor::count_multivalue ( ) const
inline

Return count of duplicates for current key.

◆ count_multivalue() [2/2]

size_t mdbx::cursor::count_multivalue ( MDBX_stat * stat) const
inline

Return count of duplicates for current key, along with basic statistics of the table.

See also
mdbx_cursor_count_ex()

◆ create_map() [1/3]

map_handle mdbx::txn::create_map ( const ::std::string & name,
const ::mdbx::key_mode key_mode = ::mdbx::key_mode::usual,
const ::mdbx::value_mode value_mode = ::mdbx::value_mode::single )
inline

Create new or open existing key-value map.

◆ create_map() [2/3]

map_handle mdbx::txn::create_map ( const char * name,
const ::mdbx::key_mode key_mode = ::mdbx::key_mode::usual,
const ::mdbx::value_mode value_mode = ::mdbx::value_mode::single )
inline

Create new or open existing key-value map.

◆ create_map() [3/3]

map_handle mdbx::txn::create_map ( const slice & name,
const ::mdbx::key_mode key_mode = ::mdbx::key_mode::usual,
const ::mdbx::value_mode value_mode = ::mdbx::value_mode::single )
inline

Create new or open existing key-value map.

◆ data() [1/2]

const void * mdbx::slice::data ( ) const
constexprnoexcept

Return a pointer to the beginning of the referenced data.

◆ data() [2/2]

void * mdbx::slice::data ( )
constexprnoexcept

◆ dbsize_max()

size_t mdbx::env::limits::dbsize_max ( intptr_t pagesize)
inlinestatic

Returns the maximal database size in bytes for specified page size.

◆ dbsize_min()

size_t mdbx::env::limits::dbsize_min ( intptr_t pagesize)
inlinestatic

Returns the minimal database size in bytes for specified page size.

◆ defrag() [1/2]

env::defrag_result mdbx::env::defrag ( size_t defrag_atleast = 0,
size_t time_atleast_dot16 = 0,
size_t defrag_enough = 0,
size_t time_limit_dot16 = 0,
intptr_t acceptable_backlash = -1,
intptr_t preferred_batch = 0 )
inline

Performs database defragmentation without a progress visitor.

The same defragmentation as in the overload accepting a visitor functor, but without progress callbacks.

Parameters
[in]defrag_atleastThe required at least number of pages by which the database must be reduced, zero means no lower bound.
[in]time_atleast_dot16The minimum time in 1/65536 fractions of a second that should be spent to defragment more even if goals reached, zero means no lower bound.
[in]defrag_enoughThe number of pages by which it will be enough to shrink the database to finish, zero means no limit.
[in]time_limit_dot16The time limit in 1/65536 fractions of a second that could be spent to defragment, zero means no limit.
[in]acceptable_backlashStop if the next cycle will be unable to shrink the database by more pages than this value, -1 means autopilot.
[in]preferred_batchThe preferred maximum number of pages to be moved per defragmentation cycle, zero means no limit.
Exceptions
mdbx::erroron failure (other than stopping reasons above).
See also
mdbx_env_defrag()

◆ defrag() [2/2]

template<typename VISITOR>
env::defrag_result mdbx::env::defrag ( VISITOR & visitor,
size_t defrag_atleast = 0,
size_t time_atleast_dot16 = 0,
size_t defrag_enough = 0,
size_t time_limit_dot16 = 0,
intptr_t acceptable_backlash = -1,
intptr_t preferred_batch = 0 )
inline

Performs database defragmentation.

Defragmentation is the transfer of data from pages located at the end of the database to free pages closer to the beginning, so the freed tail can be cut off while reducing the size of the database file, see mdbx_env_defrag(). It is almost always performed in several cycles, each of which ends with committing an internal transaction.

Note
No transactions nor cursors must be open while defragmenting.

The visitor functor (if provided) is called time-to-time with a reference to the current defrag_result and must return defrag_control::proceed to continue, defrag_control::abort to abort immediately, or defrag_control::discontinue to stop after completing scheduled operations.

Returns
The final defrag_result. Stopping reasons are reported via its stopping_reasons field and are not treated as errors (the same for MDBX_RESULT_TRUE and MDBX_LAGGARD_READER).
Parameters
[in,out]visitorAn optional functor with the signature defrag_control visitor(const defrag_result &progress).
[in]defrag_atleastThe required at least number of pages by which the database must be reduced, zero means no lower bound.
[in]time_atleast_dot16The minimum time in 1/65536 fractions of a second that should be spent to defragment more even if goals reached, zero means no lower bound.
[in]defrag_enoughThe number of pages by which it will be enough to shrink the database to finish, zero means no limit.
[in]time_limit_dot16The time limit in 1/65536 fractions of a second that could be spent to defragment, zero means no limit.
[in]acceptable_backlashStop if the next cycle will be unable to shrink the database by more pages than this value, -1 means autopilot.
[in]preferred_batchThe preferred maximum number of pages to be moved per defragmentation cycle, zero means no limit.
Exceptions
mdbx::erroron failure (other than stopping reasons above).
See also
mdbx_env_defrag()

◆ disable_clear_memory()

env::operate_parameters & mdbx::env::operate_parameters::disable_clear_memory ( bool value = true)
constexprnoexcept

Sets the clear-memory disable mode, i.e. operate_options::disable_clear_memory.

◆ disable_readahead()

env::operate_parameters & mdbx::env::operate_parameters::disable_readahead ( bool value = true)
constexprnoexcept

Sets the readahead disable mode, i.e. operate_options::disable_readahead.

◆ distance_between()

ptrdiff_t mdbx::cursor::distance_between ( const cursor from,
const cursor to,
unsigned deepness = 42 )
inlinestatic

◆ distribute() [1/3]

bool mdbx::cursor::distribute ( const cursor from,
const cursor to,
const std::vector< cursor > & cursors,
unsigned deepness = 42 )
inlinestatic

◆ distribute() [2/3]

bool mdbx::cursor::distribute ( const cursor from,
const cursor to,
const std::vector< cursor_managed > & cursors,
unsigned deepness = 42 )
inlinestatic

◆ distribute() [3/3]

bool mdbx::cursor::distribute ( const cursor from,
const cursor to,
cursor * cursors_array,
intptr_t cursors_array_size,
unsigned deepness = 42 )
inlinestatic

◆ drop_map() [1/2]

bool mdbx::txn::drop_map ( const ::std::string & name,
bool throw_if_absent = false )
inline

Drop key-value map.

Returns
True if the key-value map existed and was deleted, either false if the key-value map did not exist and there is nothing to delete.

◆ drop_map() [2/2]

void mdbx::txn::drop_map ( map_handle map)
inline

Drops key-value map using handle.

◆ empty()

bool mdbx::slice::empty ( ) const
constexprnoexcept

Checks whether the slice is empty.

◆ enable_validation()

env::operate_parameters & mdbx::env::operate_parameters::enable_validation ( bool value = true)
constexprnoexcept

Sets the validation enable mode, i.e. operate_options::enable_validation.

◆ encode_base58()

template<class ALLOCATOR, class CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::encode_base58 ( unsigned wrap_width = 0,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Returns a buffer with a Base58 dump of the slice content.

◆ encode_base64()

template<class ALLOCATOR, class CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::encode_base64 ( unsigned wrap_width = 0,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Returns a buffer with a Base64 dump of the slice content.

◆ encode_hex()

template<class ALLOCATOR, class CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::encode_hex ( bool uppercase = false,
unsigned wrap_width = 0,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Returns a buffer with a hexadecimal dump of the slice content.

◆ end() [1/2]

const byte * mdbx::slice::end ( ) const
constexprnoexcept

Return a pointer to the end of the referenced data.

An iterator-style pointer (one past the last byte).

◆ end() [2/2]

byte * mdbx::slice::end ( )
constexprnoexcept

Return a pointer to the end of the referenced data.

An iterator-style pointer (one past the last byte).

◆ end_byte_ptr() [1/2]

const byte * mdbx::slice::end_byte_ptr ( ) const
constexprnoexcept

Returns casted to pointer to byte an end of data.

◆ end_byte_ptr() [2/2]

byte * mdbx::slice::end_byte_ptr ( )
constexprnoexcept

◆ end_char_ptr() [1/2]

const char * mdbx::slice::end_char_ptr ( ) const
constexprnoexcept

Returns casted to pointer to char an end of data.

◆ end_char_ptr() [2/2]

char * mdbx::slice::end_char_ptr ( )
constexprnoexcept

◆ ends_with()

bool mdbx::slice::ends_with ( const slice & suffix) const
constexprnoexcept

Checks if the data ends with the given suffix.

◆ enumerate_readers()

template<typename VISITOR>
int mdbx::env::enumerate_readers ( VISITOR & visitor)
inline

Enumerate readers.

The VISITOR class must have int operator()(const reader_info&, int serial) which should return continue_loop (zero) to continue enumeration, or any non-zero value to exit.

Returns
The last value returned from visitor' functor.

◆ enumerate_tables()

template<typename VISITOR>
int mdbx::txn::enumerate_tables ( VISITOR & visitor) const
inline

Enumerates user's named tables in a database.

Calls the visitor functor for each user-created named table until the named tables are exhausted, or until the visitor returns exit_loop (which will be returned as a result).

Parameters
[in,out]visitorA functor with the signature int visitor(const slice &name, MDBX_db_flags_t flags, const MDBX_stat &stat, MDBX_dbi dbi), which will be called for each table.
Returns
The last value returned by the visitor's functor.
See also
mdbx_enumerate_tables()

◆ env() [3/3]

env mdbx::txn::env ( ) const
inlinenoexcept

Returns the transaction's environment.

◆ eof()

bool mdbx::cursor::eof ( ) const
inline

◆ erase() [1/5]

bool mdbx::cursor::erase ( bool whole_multivalue = false)
inline

Removes single key-value pair or all multi-values at the current cursor position.

◆ erase() [2/5]

bool mdbx::cursor::erase ( const slice & key,
bool whole_multivalue = true )
inline

Seeks and removes first value or whole multi-value of the given key.

Returns
True if the key is found and a value(s) is removed.

◆ erase() [3/5]

bool mdbx::cursor::erase ( const slice & key,
const slice & value )
inline

Seeks and removes the particular multi-value entry of the key.

Returns
True if the given key-value pair is found and removed.

◆ erase() [4/5]

bool mdbx::txn::erase ( map_handle map,
const slice & key )
inline

Removes all values for given key.

◆ erase() [5/5]

bool mdbx::txn::erase ( map_handle map,
const slice & key,
const slice & value )
inline

Removes the particular multi-value entry of the key.

◆ erase_bunch()

size_t mdbx::cursor::erase_bunch ( bunch_delete action)
inline

Quickly removes bunches of neighboring items much faster by cutting out entire pages and branches from the B+ tree structure.

Returns
The number of removed items.
See also
erase_range()
mdbx_cursor_bunch_delete()

◆ erase_range()

size_t mdbx::cursor::erase_range ( const cursor & end,
bool end_including )
inline

Quickly removes a range of items between the current cursor position and the position of end much faster by cutting out entire pages and branches from the B+ tree structure.

Parameters
[in]endA positioned cursor defining the end of the range.
[in]end_includingWhether the end position itself should be included in the range to be deleted.
Returns
The number of removed items.
See also
erase_bunch()
mdbx_cursor_delete_range()

◆ estimate() [1/8]

cursor::estimate_result mdbx::cursor::estimate ( const slice & key) const
inline

◆ estimate() [2/8]

cursor::estimate_result mdbx::cursor::estimate ( const slice & key,
const slice & value ) const
inline

◆ estimate() [3/8]

cursor::estimate_result mdbx::cursor::estimate ( move_operation operation) const
inline

◆ estimate() [4/8]

cursor::estimate_result mdbx::cursor::estimate ( move_operation operation,
const slice & key ) const
inline

◆ estimate() [5/8]

ptrdiff_t mdbx::cursor::estimate ( move_operation operation,
MDBX_val * key,
MDBX_val * value ) const
inlineprotected

◆ estimate() [6/8]

ptrdiff_t mdbx::estimate ( const cursor & from,
const cursor & to )
inline

◆ estimate() [7/8]

ptrdiff_t mdbx::txn::estimate ( map_handle map,
const pair & from,
const pair & to ) const
inline

◆ estimate() [8/8]

ptrdiff_t mdbx::txn::estimate ( map_handle map,
const slice & from,
const slice & to ) const
inline

◆ estimate_from_first()

ptrdiff_t mdbx::txn::estimate_from_first ( map_handle map,
const slice & to ) const
inline

◆ estimate_to_last()

ptrdiff_t mdbx::txn::estimate_to_last ( map_handle map,
const slice & from ) const
inline

◆ exclusive()

env::operate_parameters & mdbx::env::operate_parameters::exclusive ( bool value = true)
constexprnoexcept

Sets the exclusive mode, i.e. operate_options::exclusive.

◆ extra_option()

uint64_t mdbx::env::extra_option ( enum env::extra_runtime_option option) const
inline

Gets the value of extra runtime options from an environment.

◆ extract()

template<class BUFFER, typename ALLOCATOR>
BUFFER mdbx::txn::extract ( map_handle map,
const slice & key,
const ALLOCATOR & alloc = ALLOCATOR() )
inline

Removes and return a value of the key.

◆ find() [1/3]

cursor::move_result mdbx::cursor::find ( const slice & key,
bool throw_notfound = true )
inline

◆ find() [2/3]

size_t mdbx::slice::find ( byte c,
size_t pos = 0 ) const
constexprnoexcept

Finds the first occurrence of needle starting at pos.

Returns
The position of the first match or npos.

◆ find() [3/3]

size_t mdbx::slice::find ( const slice & needle,
size_t pos = 0 ) const
constexprnoexcept

Finds the first occurrence of needle starting at pos.

Returns
The position of the first match or npos.

◆ find_first_not_of() [1/2]

size_t mdbx::slice::find_first_not_of ( byte c,
size_t pos = 0 ) const
constexprnoexcept

Finds the first byte not matching any byte of chars starting at pos.

Returns
The position of the first match or npos.

◆ find_first_not_of() [2/2]

size_t mdbx::slice::find_first_not_of ( const slice & chars,
size_t pos = 0 ) const
constexprnoexcept

Finds the first byte not matching any byte of chars starting at pos.

Returns
The position of the first match or npos.

◆ find_first_of() [1/2]

size_t mdbx::slice::find_first_of ( byte c,
size_t pos = 0 ) const
constexprnoexcept

Finds the first byte matching any byte of chars starting at pos.

Returns
The position of the first match or npos.

◆ find_first_of() [2/2]

size_t mdbx::slice::find_first_of ( const slice & chars,
size_t pos = 0 ) const
constexprnoexcept

Finds the first byte matching any byte of chars starting at pos.

Returns
The position of the first match or npos.

◆ find_last_not_of() [1/2]

size_t mdbx::slice::find_last_not_of ( byte c,
size_t pos = npos ) const
constexprnoexcept

Finds the last byte not matching any byte of chars not after pos.

Returns
The position of the last match or npos.

◆ find_last_not_of() [2/2]

size_t mdbx::slice::find_last_not_of ( const slice & chars,
size_t pos = npos ) const
constexprnoexcept

Finds the last byte not matching any byte of chars not after pos.

Returns
The position of the last match or npos.

◆ find_last_of() [1/2]

size_t mdbx::slice::find_last_of ( byte c,
size_t pos = npos ) const
constexprnoexcept

Finds the last byte matching any byte of chars not after pos.

Returns
The position of the last match or npos.

◆ find_last_of() [2/2]

size_t mdbx::slice::find_last_of ( const slice & chars,
size_t pos = npos ) const
constexprnoexcept

Finds the last byte matching any byte of chars not after pos.

Returns
The position of the last match or npos.

◆ find_multivalue()

cursor::move_result mdbx::cursor::find_multivalue ( const slice & key,
const slice & value,
bool throw_notfound = true )
inline

◆ flags()

MDBX_txn_flags_t mdbx::txn::flags ( ) const
inline

Returns transaction's flags.

◆ fragile_write()

env::operate_parameters mdbx::env::operate_parameters::fragile_write ( )
staticconstexprnoexcept

Constructs parameters for a writable environment with env::durability::whole_fragile durability and env::mode::write_mapped_io.

◆ get() [1/4]

slice mdbx::txn::get ( map_handle map,
const slice & key ) const
inline

Get value by key from a key-value map (aka table).

◆ get() [2/4]

slice mdbx::txn::get ( map_handle map,
const slice & key,
const slice & value_at_absence ) const
inline

Get value by key from a key-value map (aka table).

◆ get() [3/4]

slice mdbx::txn::get ( map_handle map,
slice key,
size_t & values_count ) const
inline

Get first of multi-value and values count by key from a key-value multimap (aka table).

◆ get() [4/4]

slice mdbx::txn::get ( map_handle map,
slice key,
size_t & values_count,
const slice & value_at_absence ) const
inline

Get first of multi-value and values count by key from a key-value multimap (aka table).

◆ get_batch()

std::vector< pair > mdbx::cursor::get_batch ( size_t max_pairs,
move_operation op,
bool * is_last = nullptr ) const
inline

Reads a batch of key-value pairs.

Fetches up to max_pairs key-value pairs starting from the current cursor position, advancing the cursor. The returned slices reference database-owned memory and remain valid while the transaction and cursor are alive.

Parameters
[in]max_pairsThe maximum number of key-value pairs to fetch.
[in]opThe positioning operation, either move_operation::first or move_operation::next.
[out]is_lastOptional flag set to true when the returned chunk is the last one (no pairs left after it).
Returns
The vector of fetched key-value pairs.
See also
mdbx_cursor_get_batch()

◆ get_build()

const build_info & mdbx::get_build ( )
constexprnoexcept

Returns libmdbx build information.

◆ get_cached() [1/2]

slice mdbx::txn::get_cached ( map_handle map,
const slice & key,
cache_entry & entry,
cache_status * status = nullptr ) const
inline

Gets a value by key using the transparent read-your-writes cache, throwing exceptions on errors.

Parameters
[in]mapThe table handle.
[in]keyThe key to search for.
[in,out]entryThe cache entry corresponding to the key.
[out]statusOptional address to receive the cache_status.
Returns
The resulting value, or throws mdbx::not_found if the key is absent (like get()).
See also
mdbx_cache_get()

◆ get_cached() [2/2]

txn::cache_result mdbx::txn::get_cached ( map_handle map,
const slice & key,
slice * data,
cache_entry & entry ) const
inline

Gets a value by key using the transparent read-your-writes cache.

Uses the cached information to check as quickly as possible whether the data has changed or not, with early exit when searching through the DB. Supports multithreaded cases and resolves collisions in a lockfree way; the MDBX_NOSTICKYTHREADS mode is required to use it from different threads.

Parameters
[in]mapThe table handle.
[in]keyThe key to search for.
[out]dataThe resulting value; points into database-owned memory and remains valid until the transaction end.
[in,out]entryThe cache entry corresponding to the key, must be initialized (cache_entry::reset()) before use.
Returns
The cache_result with the pair of error code and cache status. The caller inspects errcode and status explicitly.
See also
mdbx_cache_get()

◆ get_canary()

txn::canary mdbx::txn::get_canary ( ) const
inline

Returns the four integer markers (aka "canary") associated with the environment.

◆ get_context() [1/3]

void * mdbx::cursor::get_context ( ) const
inlinenoexcept

Returns the application context associated with the cursor.

◆ get_context() [2/3]

void * mdbx::env::get_context ( ) const
inlinenoexcept

Returns the application context associated with the environment.

◆ get_context() [3/3]

void * mdbx::txn::get_context ( ) const
inlinenoexcept

Returns the application context associated with the transaction.

◆ get_durability()

env::durability mdbx::env::get_durability ( ) const
inline

Returns current durability mode.

◆ get_equal_or_great() [1/2]

pair_result mdbx::txn::get_equal_or_great ( map_handle map,
const slice & key ) const
inline

Gets the value for an equal or greater key from a table.

Returns
Bundle of key-value pair and boolean flag, which will be true if the exact key was found and false otherwise.

◆ get_equal_or_great() [2/2]

pair_result mdbx::txn::get_equal_or_great ( map_handle map,
const slice & key,
const slice & value_at_absence ) const
inline

Gets the value for an equal or greater key from a table.

Returns
Bundle of key-value pair and boolean flag, which will be true if the exact key was found and false otherwise.

◆ get_filehandle()

filehandle mdbx::env::get_filehandle ( ) const
inline

Returns the file descriptor for the DXB file of MDBX environment.

◆ get_flags()

MDBX_env_flags_t mdbx::env::get_flags ( ) const
inline

Returns environment flags.

◆ get_gc_info() [1/2]

txn::gc_info mdbx::txn::get_gc_info ( ) const
inline

◆ get_gc_info() [2/2]

template<typename VISITOR>
txn::gc_info mdbx::txn::get_gc_info ( VISITOR & visitor) const
inline

Provides information of Garbage Collection and page usage.

Scans the whole GC to summarise the GC state and page usage for the given transaction, optionally iterating GC entries by calling the visitor functor for each span of pages inside GC (excepting the pages forming the B-tree structure of GC itself).

Parameters
[in,out]visitorAn optional functor with the signature int visitor(uint64_t span_txnid, size_t span_pgno, size_t span_length, bool span_is_reclaimable) returning continue_loop to proceed or any other value to stop enumeration.
Returns
The gc_info of the database. An empty (zeroed) info is returned when the GC is empty (MDBX_NOTFOUND).
Note
This API has not been frozen yet.
See also
mdbx_gc_info()

◆ get_HandleSlowReaders()

MDBX_hsr_func mdbx::env::get_HandleSlowReaders ( ) const
inlinenoexcept

Returns the current Handle-Slow-Readers callback used to resolve database full/overflow issue due to a reader(s) which prevents the old data from being recycled.

See also
set_HandleSlowReaders()

◆ get_info() [1/3]

env::info mdbx::env::get_info ( ) const
inline

Return snapshot information about the MDBX environment.

◆ get_info() [2/3]

env::info mdbx::env::get_info ( const txn & txn) const
inline

Return information about the MDBX environment accordingly to the specified transaction.

◆ get_info() [3/3]

txn::info mdbx::txn::get_info ( bool scan_reader_lock_table = false) const
inline

Returns information about the MDBX transaction.

◆ get_map_flags()

map_handle::info mdbx::txn::get_map_flags ( map_handle map) const
inline

Returns information about key-value map (aka table) handle.

◆ get_map_stat()

txn::map_stat mdbx::txn::get_map_stat ( map_handle map) const
inline

Returns statistics for a table.

◆ get_mode()

env::mode mdbx::env::get_mode ( ) const
inline

Returns current operation mode.

◆ get_operation_parameters()

env::operate_parameters mdbx::env::get_operation_parameters ( ) const
inline

Returns current operation parameters.

◆ get_options()

env::operate_options mdbx::env::get_options ( ) const
inline

Returns current operate options.

◆ get_preopen_snapinfo() [1/3]

env::info mdbx::env::get_preopen_snapinfo ( const ::mdbx::filesystem::path & pathname)
inlinestatic

◆ get_preopen_snapinfo() [2/3]

env::info mdbx::env::get_preopen_snapinfo ( const ::std::string & pathname)
inlinestatic

Provides information about a database, including meta-page and geometry, without opening it.

Returns
The info of the database. Errors are thrown as mdbx::error.
See also
mdbx_preopen_snapinfo()

◆ get_preopen_snapinfo() [3/3]

env::info mdbx::env::get_preopen_snapinfo ( const char * pathname)
inlinestatic

◆ get_reclaiming()

env::reclaiming_options mdbx::env::get_reclaiming ( ) const
inline

Returns current reclaiming options.

◆ get_stat() [1/2]

env::stat mdbx::env::get_stat ( ) const
inline

Returns snapshot statistics about the MDBX environment.

◆ get_stat() [2/2]

env::stat mdbx::env::get_stat ( const txn & txn) const
inline

Return statistics about the MDBX environment accordingly to the specified transaction.

◆ get_sysraminfo()

env::sysraminfo mdbx::env::get_sysraminfo ( )
inlinestatic

Returns information about the system RAM.

◆ get_tree_deepmask()

uint32_t mdbx::txn::get_tree_deepmask ( map_handle map) const
inline

Returns depth (bitmask) information of nested dupsort (multi-value) B+trees for given table.

◆ get_version()

const version_info & mdbx::get_version ( )
constexprnoexcept

Returns libmdbx version information.

◆ half_synchronous_weak_last()

env::operate_parameters & mdbx::env::operate_parameters::half_synchronous_weak_last ( )
constexprnoexcept

Sets the durability level to env::durability::half_synchronous_weak_last.

◆ hash_value()

size_t mdbx::slice::hash_value ( ) const
constexprnoexcept

Returns the hash value of referenced data.

Attention
Function implementation and returned hash values may change from version to version, and in future the t1ha3 will be used here. Therefore values obtained from this function shouldn't be persisted anywhere.

◆ head()

slice mdbx::slice::head ( size_t n) const
constexprnoexcept

Returns the first "n" bytes of the slice.

Precondition
REQUIRES: n <= size()

◆ hex_decode()

template<class ALLOCATOR, class CAPACITY_POLICY>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::slice::hex_decode ( bool ignore_spaces = false,
const ALLOCATOR & alloc = ALLOCATOR() ) const
inline

Decodes hexadecimal dump from the slice content to returned buffer.

◆ id()

uint64_t mdbx::txn::id ( ) const
inline

Return the transaction's ID.

◆ ignore_key_order()

void mdbx::cursor::ignore_key_order ( )
inline

Disables the control of the order of keys when reading database pages for this cursor.

Useful when reading a database whose user-defined comparison functions are unavailable, otherwise such reads return MDBX_CORRUPTED.

See also
mdbx_cursor_ignord()

◆ insert() [1/2]

void mdbx::cursor::insert ( const slice & key,
slice value )
inline

◆ insert() [2/2]

void mdbx::txn::insert ( map_handle map,
const slice & key,
slice value )
inline

◆ insert_reserve() [1/2]

slice mdbx::cursor::insert_reserve ( const slice & key,
size_t value_length )
inline

◆ insert_reserve() [2/2]

slice mdbx::txn::insert_reserve ( map_handle map,
const slice & key,
size_t value_length )
inline

◆ invalidate()

void mdbx::slice::invalidate ( )
constexprnoexcept

Invalidates the slice by nullifying the data pointer while preserving the length; makes is_valid() return false unless the slice was already of zero length.

◆ is_base58()

bool mdbx::slice::is_base58 ( bool ignore_spaces = false) const
inlinenoexcept

Checks whether the content of the slice is a Base58 dump.

Parameters
[in]ignore_spacesIf true function will skips spaces surrounding (before, between and after) a encoded bytes. However, spaces should not break a code group of characters.

◆ is_base64()

bool mdbx::slice::is_base64 ( bool ignore_spaces = false) const
inlinenoexcept

Checks whether the content of the slice is a Base64 dump.

Parameters
[in]ignore_spacesIf true function will skips spaces surrounding (before, between and after) a encoded bytes. However, spaces should not break a code group of characters.

◆ is_clean()

bool mdbx::exception_thunk::is_clean ( ) const
inlinenoexcept

◆ is_dirty()

bool mdbx::txn::is_dirty ( const void * ptr) const
inline

Checks whether the given data is on a dirty page.

◆ is_failure()

bool mdbx::error::is_failure ( ) const
constexprnoexcept

◆ is_hex()

bool mdbx::slice::is_hex ( bool ignore_spaces = false) const
inlinenoexcept

Checks whether the content of the slice is a hexadecimal dump.

Parameters
[in]ignore_spacesIf true function will skips spaces surrounding (before, between and after) a encoded bytes. However, spaces should not break a pair of characters encoding a single byte.

◆ is_mdbx_error()

bool mdbx::error::is_mdbx_error ( ) const
constexprnoexcept

Returns true for MDBX's errors.

◆ is_null()

bool mdbx::slice::is_null ( ) const
constexprnoexcept

Checks whether the slice data pointer is nullptr.

◆ is_result_false()

bool mdbx::error::is_result_false ( ) const
constexprnoexcept

◆ is_result_true()

bool mdbx::error::is_result_true ( ) const
constexprnoexcept

◆ is_success()

bool mdbx::error::is_success ( ) const
constexprnoexcept

◆ key_max() [1/4]

size_t mdbx::env::limits::key_max ( const env & env,
key_mode mode )
inlinestatic

Returns the maximal key size in bytes for given environment and keys mode.

◆ key_max() [2/4]

size_t mdbx::env::limits::key_max ( const env & env,
MDBX_db_flags_t flags )
inlinestatic

Returns the maximal key size in bytes for given environment and table flags.

◆ key_max() [3/4]

size_t mdbx::env::limits::key_max ( intptr_t pagesize,
key_mode mode )
inlinestatic

Returns the maximal key size in bytes for specified page size and keys mode.

◆ key_max() [4/4]

size_t mdbx::env::limits::key_max ( intptr_t pagesize,
MDBX_db_flags_t flags )
inlinestatic

Returns the maximal key size in bytes for specified page size and table flags.

◆ key_min() [1/2]

size_t mdbx::env::limits::key_min ( key_mode mode)
inlinestaticnoexcept

Returns the minimal key size in bytes for specified keys mode.

◆ key_min() [2/2]

size_t mdbx::env::limits::key_min ( MDBX_db_flags_t flags)
inlinestaticnoexcept

Returns the minimal key size in bytes for specified table flags.

◆ key_mode()

MDBX_CXX11_CONSTEXPR_ENUM mdbx::key_mode mdbx::map_handle::info::key_mode ( ) const
noexcept

◆ lazy_weak_tail()

env::operate_parameters & mdbx::env::operate_parameters::lazy_weak_tail ( )
constexprnoexcept

Sets the durability level to env::durability::lazy_weak_tail.

◆ lazy_write()

env::operate_parameters mdbx::env::operate_parameters::lazy_write ( )
staticconstexprnoexcept

Constructs parameters for a writable environment with env::durability::lazy_weak_tail durability and env::mode::write_mapped_io.

◆ length()

size_t mdbx::slice::length ( ) const
constexprnoexcept

Returns the number of bytes.

◆ lifo()

env::operate_parameters & mdbx::env::operate_parameters::lifo ( bool value = true)
constexprnoexcept

Sets the LIFO reclaiming mode, i.e. reclaiming_options::lifo.

◆ lower_bound()

cursor::move_result mdbx::cursor::lower_bound ( const slice & key,
bool throw_notfound = false )
inline

◆ lower_bound_multivalue()

cursor::move_result mdbx::cursor::lower_bound_multivalue ( const slice & key,
const slice & value,
bool throw_notfound = false )
inline

◆ make_broken()

void mdbx::txn::make_broken ( )
inline

Marks transaction as broken to prevent further operations.

◆ make_buffer() [1/2]

template<class ALLOCATOR, class CAPACITY_POLICY, ImmutableByteProducer PRODUCER>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::make_buffer ( const PRODUCER & producer,
const ALLOCATOR & alloc )
inline

◆ make_buffer() [2/2]

template<class ALLOCATOR, class CAPACITY_POLICY, MutableByteProducer PRODUCER>
buffer< ALLOCATOR, CAPACITY_POLICY > mdbx::make_buffer ( PRODUCER & producer,
const ALLOCATOR & alloc )
inline

◆ make_dynamic()

env::geometry & mdbx::env::geometry::make_dynamic ( intptr_t lower = default_value,
intptr_t upper = default_value )
constexprnoexcept

◆ make_fixed()

env::geometry & mdbx::env::geometry::make_fixed ( intptr_t size)
constexprnoexcept

◆ make_string() [1/2]

template<class ALLOCATOR, ImmutableByteProducer PRODUCER>
string< ALLOCATOR > mdbx::make_string ( const PRODUCER & producer,
const ALLOCATOR & alloc )
inline

◆ make_string() [2/2]

template<class ALLOCATOR, MutableByteProducer PRODUCER>
string< ALLOCATOR > mdbx::make_string ( PRODUCER & producer,
const ALLOCATOR & alloc )
inline

◆ map()

map_handle mdbx::cursor::map ( ) const
inline

◆ max_map_handles()

size_t mdbx::env::limits::max_map_handles ( void )
inlinestatic

Returns the maximum opened map handles, aka DBI-handles.

◆ max_maps()

unsigned mdbx::env::max_maps ( ) const
inline

Returns the maximum number of named tables for the environment.

See also
extra_runtime_option::max_maps

◆ max_readers()

unsigned mdbx::env::max_readers ( ) const
inline

Returns the maximum number of threads/reader slots for the environment.

See also
extra_runtime_option::max_readers

◆ MDBX_EXTERN_API_TEMPLATE() [1/2]

mdbx::MDBX_EXTERN_API_TEMPLATE ( LIBMDBX_API_TYPE ,
buffer< legacy_allocator, default_capacity_policy >  )

◆ MDBX_EXTERN_API_TEMPLATE() [2/2]

mdbx::MDBX_EXTERN_API_TEMPLATE ( LIBMDBX_API_TYPE ,
buffer< polymorphic_allocator, default_capacity_policy >  )

◆ middle()

slice mdbx::slice::middle ( size_t from,
size_t n ) const
constexprnoexcept

Returns the middle "n" bytes of the slice.

Precondition
REQUIRES: from + n <= size()

◆ move()

bool mdbx::cursor::move ( move_operation operation,
MDBX_val * key,
MDBX_val * value,
bool throw_notfound ) const
inlineprotected

◆ nested_transactions()

env::operate_parameters & mdbx::env::operate_parameters::nested_transactions ( bool value = true)
constexprnoexcept

Sets the nested transactions mode, i.e. operate_options::nested_transactions.

◆ no_sticky_threads()

env::operate_parameters & mdbx::env::operate_parameters::no_sticky_threads ( bool value = true)
constexprnoexcept

Sets the "no sticky threads" mode, i.e. operate_options::no_sticky_threads.

◆ on_first()

bool mdbx::cursor::on_first ( ) const
inline

◆ on_first_multival()

bool mdbx::cursor::on_first_multival ( ) const
inline

◆ on_last()

bool mdbx::cursor::on_last ( ) const
inline

◆ on_last_multival()

bool mdbx::cursor::on_last_multival ( ) const
inline

◆ open_cursor()

cursor_managed mdbx::txn::open_cursor ( map_handle map) const
inline

Opens cursor for specified key-value map handle.

◆ open_map() [1/3]

map_handle mdbx::txn::open_map ( const ::std::string & name,
const ::mdbx::key_mode key_mode = ::mdbx::key_mode::usual,
const ::mdbx::value_mode value_mode = ::mdbx::value_mode::single ) const
inline

Open existing key-value map.

◆ open_map() [2/3]

map_handle mdbx::txn::open_map ( const char * name,
const ::mdbx::key_mode key_mode = ::mdbx::key_mode::usual,
const ::mdbx::value_mode value_mode = ::mdbx::value_mode::single ) const
inline

Open existing key-value map.

◆ open_map() [3/3]

map_handle mdbx::txn::open_map ( const slice & name,
const ::mdbx::key_mode key_mode = ::mdbx::key_mode::usual,
const ::mdbx::value_mode value_mode = ::mdbx::value_mode::single ) const
inline

Open existing key-value map.

◆ open_map_accede() [1/3]

map_handle mdbx::txn::open_map_accede ( const ::std::string & name) const
inline

Open existing key-value map.

◆ open_map_accede() [2/3]

map_handle mdbx::txn::open_map_accede ( const char * name) const
inline

Open existing key-value map.

◆ open_map_accede() [3/3]

map_handle mdbx::txn::open_map_accede ( const slice & name) const
inline

Open existing key-value map.

◆ operator!=() [1/3]

bool mdbx::operator!= ( const error & a,
const error & b )
constexprnoexcept

◆ operator!=() [2/3]

bool mdbx::operator!= ( const pair & a,
const pair & b )
constexprnoexcept

◆ operator!=() [3/3]

bool mdbx::operator!= ( const slice & a,
const slice & b )
constexprnoexcept

◆ operator<() [1/2]

bool mdbx::operator< ( const pair & a,
const pair & b )
constexprnoexcept

◆ operator<() [2/2]

bool mdbx::operator< ( const slice & a,
const slice & b )
constexprnoexcept

◆ operator<<() [1/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::durability &  )

◆ operator<<() [2/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::geometry &  )

◆ operator<<() [3/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::geometry::size &  )

◆ operator<<() [4/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::mode &  )

◆ operator<<() [5/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::operate_options &  )

◆ operator<<() [6/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::operate_parameters &  )

◆ operator<<() [7/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env::reclaiming_options &  )

◆ operator<<() [8/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const env_managed::create_parameters &  )

◆ operator<<() [9/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const error &  )

◆ operator<<() [10/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const MDBX_debug_flags_t &  )

◆ operator<<() [11/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const MDBX_log_level_t &  )

◆ operator<<() [12/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const pair &  )

◆ operator<<() [13/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const pair_result &  )

◆ operator<<() [14/19]

LIBMDBX_API::std::ostream & mdbx::operator<< ( ::std::ostream & ,
const slice &  )

◆ operator<<() [15/19]

template<class ALLOCATOR, typename CAPACITY_POLICY>
inline ::std::ostream & mdbx::operator<< ( ::std::ostream & out,
const buffer< ALLOCATOR, CAPACITY_POLICY > & it )

◆ operator<<() [16/19]

inline ::std::ostream & mdbx::operator<< ( ::std::ostream & out,
const MDBX_error_t & errcode )

◆ operator<<() [17/19]

inline ::std::ostream & mdbx::operator<< ( ::std::ostream & out,
const to_base58 & wrapper )

◆ operator<<() [18/19]

inline ::std::ostream & mdbx::operator<< ( ::std::ostream & out,
const to_base64 & wrapper )

◆ operator<<() [19/19]

inline ::std::ostream & mdbx::operator<< ( ::std::ostream & out,
const to_hex & wrapper )

◆ operator<=() [1/2]

bool mdbx::operator<= ( const pair & a,
const pair & b )
constexprnoexcept

◆ operator<=() [2/2]

bool mdbx::operator<= ( const slice & a,
const slice & b )
constexprnoexcept

◆ operator=() [1/5]

cursor & mdbx::cursor::operator= ( cursor && other)
inlinenoexcept

◆ operator=() [2/5]

env & mdbx::env::operator= ( env && other)
inlinenoexcept

◆ operator=() [3/5]

slice & mdbx::slice::operator= ( ::MDBX_val && src)
inline

◆ operator=() [4/5]

slice & mdbx::slice::operator= ( slice && src)
inlinenoexcept

◆ operator=() [5/5]

txn & mdbx::txn::operator= ( txn && other)
inlinenoexcept

◆ operator==() [1/3]

bool mdbx::operator== ( const error & a,
const error & b )
constexprnoexcept

◆ operator==() [2/3]

bool mdbx::operator== ( const pair & a,
const pair & b )
constexprnoexcept

◆ operator==() [3/3]

bool mdbx::operator== ( const slice & a,
const slice & b )
constexprnoexcept

◆ operator>() [1/2]

bool mdbx::operator> ( const pair & a,
const pair & b )
constexprnoexcept

◆ operator>() [2/2]

bool mdbx::operator> ( const slice & a,
const slice & b )
constexprnoexcept

◆ operator>=() [1/2]

bool mdbx::operator>= ( const pair & a,
const pair & b )
constexprnoexcept

◆ operator>=() [2/2]

bool mdbx::operator>= ( const slice & a,
const slice & b )
constexprnoexcept

◆ operator[]()

byte mdbx::slice::operator[] ( size_t n) const
constexprnoexcept

Returns the nth byte in the referenced data.

Precondition
REQUIRES: n < size()

◆ options_from_flags()

env::operate_options mdbx::env::operate_parameters::options_from_flags ( MDBX_env_flags_t flags)
inlinestaticnoexcept

◆ pagesize_max()

size_t mdbx::env::limits::pagesize_max ( )
inlinestaticnoexcept

Returns the maximal database page size in bytes.

◆ pagesize_min()

size_t mdbx::env::limits::pagesize_min ( )
inlinestaticnoexcept

Returns the minimal database page size in bytes.

◆ pairsize4page_max() [1/4]

size_t mdbx::env::limits::pairsize4page_max ( const env & env,
MDBX_db_flags_t flags )
inlinestatic

Returns maximal size of key-value pair to fit in a single page for given environment and table flags.

◆ pairsize4page_max() [2/4]

size_t mdbx::env::limits::pairsize4page_max ( const env & env,
value_mode mode )
inlinestatic

Returns maximal size of key-value pair to fit in a single page for given environment and values mode.

◆ pairsize4page_max() [3/4]

size_t mdbx::env::limits::pairsize4page_max ( intptr_t pagesize,
MDBX_db_flags_t flags )
inlinestatic

Returns maximal size of key-value pair to fit in a single page for specified page size and table flags.

◆ pairsize4page_max() [4/4]

size_t mdbx::env::limits::pairsize4page_max ( intptr_t pagesize,
value_mode mode )
inlinestatic

Returns maximal size of key-value pair to fit in a single page for specified page size and values mode.

◆ park_reading()

void mdbx::txn::park_reading ( bool autounpark = true)
inline

Park read-only transaction.

◆ prepare_read()

txn_managed mdbx::env::prepare_read ( ) const
inline

Creates but not start read transaction.

◆ put() [1/4]

MDBX_error_t mdbx::cursor::put ( const slice & key,
slice * value,
MDBX_put_flags_t flags )
inlinenoexcept

◆ put() [2/4]

void mdbx::cursor::put ( const slice & key,
slice value,
put_mode mode )
inline

◆ put() [3/4]

MDBX_error_t mdbx::txn::put ( map_handle map,
const slice & key,
slice * value,
MDBX_put_flags_t flags )
inlinenoexcept

◆ put() [4/4]

void mdbx::txn::put ( map_handle map,
const slice & key,
slice value,
put_mode mode )
inline

◆ put_canary()

txn & mdbx::txn::put_canary ( const canary & canary)
inline

Set integers markers (aka "canary") associated with the environment.

◆ put_multiple_samelength() [1/2]

size_t mdbx::cursor::put_multiple_samelength ( const slice & key,
const size_t value_length,
const void * values_array,
size_t values_count,
put_mode mode,
bool allow_partial = false )
inline

◆ put_multiple_samelength() [2/2]

size_t mdbx::txn::put_multiple_samelength ( map_handle map,
const slice & key,
const size_t value_length,
const void * values_array,
size_t values_count,
put_mode mode,
bool allow_partial = false )
inline

◆ read_only()

env::operate_parameters mdbx::env::operate_parameters::read_only ( )
staticconstexprnoexcept

Constructs parameters for a read-only environment.

◆ readonly()

env::operate_parameters & mdbx::env::operate_parameters::readonly ( )
constexprnoexcept

Sets the operation mode to env::mode::readonly.

◆ reclaiming_from_flags()

env::reclaiming_options mdbx::env::operate_parameters::reclaiming_from_flags ( MDBX_env_flags_t flags)
inlinestaticnoexcept

◆ refresh()

bool mdbx::txn::refresh ( )
inline

Refresh the read-only transaction to the most recent snapshot.

Replaces the MVCC-snapshot of the given read-only transaction with the most recent committed one, see mdbx_txn_refresh().

Returns
True if the transaction was already reading the most recent version and no actions were performed, or false if it was refreshed (i.e. advanced to a newer snapshot).
See also
reset_reading()
renew_reading()

◆ release_all_cursors()

size_t mdbx::txn::release_all_cursors ( bool unbind) const
inline

Unbind or close all cursors.

◆ remove_prefix()

void mdbx::slice::remove_prefix ( size_t n)
inlinenoexcept

Drops the first "n" bytes from this slice.

Precondition
REQUIRES: n <= size()

◆ remove_suffix()

void mdbx::slice::remove_suffix ( size_t n)
inlinenoexcept

Drops the last "n" bytes from this slice.

Precondition
REQUIRES: n <= size()

◆ rename_map() [1/3]

void mdbx::txn::rename_map ( map_handle map,
const ::std::string & new_name )
inline

Переименовывает таблицу ключ-значение.

◆ rename_map() [2/3]

void mdbx::txn::rename_map ( map_handle map,
const char * new_name )
inline

Переименовывает таблицу ключ-значение.

◆ rename_map() [3/3]

void mdbx::txn::rename_map ( map_handle map,
const slice & new_name )
inline

Переименовывает таблицу ключ-значение.

◆ renew()

void mdbx::cursor::renew ( ::mdbx::txn & txn)
inline

Renew/bind a cursor with a new transaction and previously used key-value map handle.

◆ renew_reading()

void mdbx::txn::renew_reading ( )
inline

Renew read-only transaction.

◆ replace() [1/2]

template<class BUFFER, typename ALLOCATOR>
BUFFER mdbx::txn::replace ( map_handle map,
const slice & key,
const slice & new_value,
const ALLOCATOR & alloc = ALLOCATOR() )
inline

Replaces and returns a value of the key with new one.

◆ replace() [2/2]

void mdbx::txn::replace ( map_handle map,
const slice & key,
slice & old_value,
const slice & new_value )
inline

Replaces the particular multi-value of the key with a new value.

◆ replace_reserve()

template<class BUFFER, typename ALLOCATOR>
BUFFER mdbx::txn::replace_reserve ( map_handle map,
const slice & key,
size_t length,
slice & new_value_reservation,
const ALLOCATOR & alloc = ALLOCATOR() )
inline

◆ reset()

void mdbx::cursor::reset ( )
inline

Resets the cursor state.

As a result of the reset, the cursor becomes unpositioned and does not allow relative positioning operations, getting or changing data until the cursor is set to a position independent of the current one.

See also
mdbx_cursor_reset()

◆ reset_reading()

void mdbx::txn::reset_reading ( )
inline

Reset read-only transaction.

◆ resurrect_after_fork()

void mdbx::env::resurrect_after_fork ( )
inline

Restores the environment after fork(), dropping all read-write locks and reader slots of the parent process.

◆ rethrow_captured()

void mdbx::exception_thunk::rethrow_captured ( ) const
inline

◆ rfind() [1/2]

size_t mdbx::slice::rfind ( byte c,
size_t pos = npos ) const
constexprnoexcept

Finds the last occurrence of needle not after pos.

Returns
The position of the last match or npos.

◆ rfind() [2/2]

size_t mdbx::slice::rfind ( const slice & needle,
size_t pos = npos ) const
constexprnoexcept

Finds the last occurrence of needle not after pos.

Returns
The position of the last match or npos.

◆ robust_synchronous()

env::operate_parameters & mdbx::env::operate_parameters::robust_synchronous ( )
constexprnoexcept

Sets the durability level to env::durability::robust_synchronous.

◆ safe_head()

slice mdbx::slice::safe_head ( size_t n) const
constexpr

Returns the first "n" bytes of the slice.

Exceptions
std::out_of_rangeif n > size()

◆ safe_middle()

slice mdbx::slice::safe_middle ( size_t from,
size_t n ) const
constexpr

Returns the middle "n" bytes of the slice.

Exceptions
std::out_of_rangeif from + n > size()

◆ safe_remove_prefix()

void mdbx::slice::safe_remove_prefix ( size_t n)
inline

Drops the first "n" bytes from this slice.

Exceptions
std::out_of_rangeif n > size()

◆ safe_remove_suffix()

void mdbx::slice::safe_remove_suffix ( size_t n)
inline

Drops the last "n" bytes from this slice.

Exceptions
std::out_of_rangeif n > size()

◆ safe_tail()

slice mdbx::slice::safe_tail ( size_t n) const
constexpr

Returns the last "n" bytes of the slice.

Exceptions
std::out_of_rangeif n > size()

◆ safe_write()

env::operate_parameters mdbx::env::operate_parameters::safe_write ( )
staticconstexprnoexcept

Constructs parameters for a writable environment with env::durability::robust_synchronous durability and env::mode::write_mapped_io.

◆ scroll()

bool mdbx::cursor::scroll ( intptr_t distable,
unsigned deepness = 42,
bool throw_notfound = true )
inline

◆ seek()

bool mdbx::cursor::seek ( const slice & key)
inline

◆ sequence() [1/2]

uint64_t mdbx::txn::sequence ( map_handle map) const
inline

Reads sequence generator associated with a key-value map (aka table).

◆ sequence() [2/2]

uint64_t mdbx::txn::sequence ( map_handle map,
uint64_t increment )
inline

Reads and increment sequence generator associated with a key-value map (aka table).

◆ set_context() [1/3]

cursor & mdbx::cursor::set_context ( void * your_context)
inline

Sets the application context associated with the cursor.

◆ set_context() [2/3]

env & mdbx::env::set_context ( void * your_context)
inline

Sets the application context associated with the environment.

◆ set_context() [3/3]

txn & mdbx::txn::set_context ( void * your_context)
inline

Sets the application context associated with the transaction.

◆ set_disable_clear_memory()

env::operate_options & mdbx::env::operate_options::set_disable_clear_memory ( bool value = true)
constexprnoexcept

Sets the clear-memory disable mode.

◆ set_disable_readahead()

env::operate_options & mdbx::env::operate_options::set_disable_readahead ( bool value = true)
constexprnoexcept

Sets the readahead disable mode.

◆ set_durability()

env::operate_parameters & mdbx::env::operate_parameters::set_durability ( env::durability value)
constexprnoexcept

Sets the durability level.

◆ set_enable_validation()

env::operate_options & mdbx::env::operate_options::set_enable_validation ( bool value = true)
constexprnoexcept

Sets the validation enable mode.

◆ set_end()

slice & mdbx::slice::set_end ( const void * ptr)
constexpr

Sets the length by specifying the end of the slice data.

◆ set_exclusive()

env::operate_options & mdbx::env::operate_options::set_exclusive ( bool value = true)
constexprnoexcept

Sets the exclusive mode.

◆ set_extra_option()

env & mdbx::env::set_extra_option ( enum env::extra_runtime_option option,
uint64_t value )
inline

Sets the value of a extra runtime options for an environment.

◆ set_file_mode_bits()

env_managed::create_parameters & mdbx::env_managed::create_parameters::set_file_mode_bits ( mdbx_mode_t value)
constexprnoexcept

Sets the file mode bits used for creation of the DB files.

◆ set_geometry() [1/2]

env & mdbx::env::set_geometry ( const geometry & size)
inline

Set all size-related parameters of environment.

◆ set_geometry() [2/2]

env_managed::create_parameters & mdbx::env_managed::create_parameters::set_geometry ( const env::geometry & value)
constexprnoexcept

Sets the database geometry for size management.

◆ set_growth_step()

env::geometry & mdbx::env::geometry::set_growth_step ( intptr_t step)
constexprnoexcept

Sets the growth step in bytes.

◆ set_HandleSlowReaders()

env & mdbx::env::set_HandleSlowReaders ( MDBX_hsr_func cb)
inline

Sets a Handle-Slow-Readers callback to resolve database full/overflow issue due to a reader(s) which prevents the old data from being recycled.

Such callback will be triggered in a case where there is not enough free space in the database due to long read transaction(s) which impedes reusing the pages of an old MVCC snapshot(s).

Using this callback you can choose how to resolve the situation:

  • abort the write transaction with an error;
  • wait for the read transaction(s) to complete;
  • notify a thread performing a long-lived read transaction and wait for an effect;
  • kill the thread or whole process that performs the long-lived read transaction;
See also
long-lived-read

◆ set_length()

slice & mdbx::slice::set_length ( size_t bytes)
constexpr

Set slice length.

◆ set_lifo()

env::reclaiming_options & mdbx::env::reclaiming_options::set_lifo ( bool value = true)
constexprnoexcept

Sets the LIFO reclaiming mode.

◆ set_max_maps()

env::operate_parameters & mdbx::env::operate_parameters::set_max_maps ( unsigned value)
constexprnoexcept

Sets the maximum number of named tables/maps for the environment. Zero means default value.

◆ set_max_readers()

env::operate_parameters & mdbx::env::operate_parameters::set_max_readers ( unsigned value)
constexprnoexcept

Sets the maximum number of threads/reader slots for the environment. Zero means default value.

◆ set_mode()

env::operate_parameters & mdbx::env::operate_parameters::set_mode ( env::mode value)
constexprnoexcept

Sets the operation mode.

◆ set_nested_transactions()

env::operate_options & mdbx::env::operate_options::set_nested_transactions ( bool value = true)
constexprnoexcept

Sets the nested transactions mode.

◆ set_no_sticky_threads()

env::operate_options & mdbx::env::operate_options::set_no_sticky_threads ( bool value = true)
constexprnoexcept

Sets the "no sticky threads" mode.

◆ set_options()

env::operate_parameters & mdbx::env::operate_parameters::set_options ( const env::operate_options & value)
constexprnoexcept

Sets the operate options.

◆ set_pagesize()

env::geometry & mdbx::env::geometry::set_pagesize ( intptr_t size)
constexprnoexcept

Sets the database page size for new database creation.

◆ set_reclaiming()

env::operate_parameters & mdbx::env::operate_parameters::set_reclaiming ( const env::reclaiming_options & value)
constexprnoexcept

Sets the garbage reclaiming options.

◆ set_shrink_threshold()

env::geometry & mdbx::env::geometry::set_shrink_threshold ( intptr_t threshold)
constexprnoexcept

Sets the shrink threshold in bytes.

◆ set_size_lower()

env::geometry & mdbx::env::geometry::set_size_lower ( intptr_t size)
constexprnoexcept

Sets the lower bound of database size in bytes.

◆ set_size_now()

env::geometry & mdbx::env::geometry::set_size_now ( intptr_t size)
constexprnoexcept

Sets the size in bytes to setup the database size for now.

◆ set_size_upper()

env::geometry & mdbx::env::geometry::set_size_upper ( intptr_t size)
constexprnoexcept

Sets the upper bound of database size in bytes.

◆ set_sync_period__seconds_16dot16()

env & mdbx::env::set_sync_period__seconds_16dot16 ( unsigned seconds_16dot16)
inline

Sets relative period since the last unsteady commit to force flush the data buffers to disk, for non-sync durability modes.

The relative period value affects all processes which operates with given environment until the last process close environment or a new value will be settled. Data is always written to disk when txn_managed::commit() is called, but the operating system may keep it buffered. MDBX always flushes the OS buffers upon commit as well, unless the environment was opened with env::durability::whole_fragile, env::durability::lazy_weak_tail or in part env::durability::half_synchronous_weak_last. The settled period is not checked asynchronously, but only by the txn_managed::commit() and env::sync_to_disk() functions. Therefore, in cases where transactions are committed infrequently and/or irregularly, polling by env::poll_sync_to_disk() may be a reasonable solution to timeout enforcement.

The default is 0, which means that no timeout is checked and no additional flush will be made.

See also
extra_runtime_option::sync_period
Parameters
[in]seconds_16dot16The period in 1/65536 of second when a synchronous flush would be made since the last unsteady commit.

◆ set_sync_period__seconds_double()

env & mdbx::env::set_sync_period__seconds_double ( double seconds)
inline

Sets relative period since the last unsteady commit to force flush the data buffers to disk, for non-sync durability modes.

The relative period value affects all processes which operates with given environment until the last process close environment or a new value will be settled. Data is always written to disk when txn_managed::commit() is called, but the operating system may keep it buffered. MDBX always flushes the OS buffers upon commit as well, unless the environment was opened with env::durability::whole_fragile, env::durability::lazy_weak_tail or in part env::durability::half_synchronous_weak_last. The settled period is not checked asynchronously, but only by the txn_managed::commit() and env::sync_to_disk() functions. Therefore, in cases where transactions are committed infrequently and/or irregularly, polling by env::poll_sync_to_disk() may be a reasonable solution to timeout enforcement.

The default is 0, which means that no timeout is checked and no additional flush will be made.

See also
extra_runtime_option::sync_period
Parameters
[in]secondsThe period in second when a synchronous flush would be made since the last unsteady commit.

◆ set_sync_threshold()

env & mdbx::env::set_sync_threshold ( size_t bytes)
inline

Sets threshold to force flush the data buffers to disk, for non-sync durability modes.

The threshold value affects all processes which operates with given environment until the last process close environment or a new value will be settled. Data is always written to disk when txn_managed::commit() is called, but the operating system may keep it buffered. MDBX always flushes the OS buffers upon commit as well, unless the environment was opened with env::durability::whole_fragile, env::durability::lazy_weak_tail or in part env::durability::half_synchronous_weak_last.

The default is 0, which means that no threshold is checked and no additional flush will be made.

See also
extra_runtime_option::sync_bytes

◆ set_use_subdirectory()

env_managed::create_parameters & mdbx::env_managed::create_parameters::set_use_subdirectory ( bool value = true)
constexprnoexcept

Sets whether to use a subdirectory to place the DB files.

◆ size()

size_t mdbx::slice::size ( ) const
constexprnoexcept

Returns the number of bytes.

◆ start_read()

txn_managed mdbx::env::start_read ( ) const
inline

Starts read (read-only) transaction.

◆ start_write() [1/2]

txn_managed mdbx::env::start_write ( bool dont_wait = false)
inline

Starts write (read-write) transaction.

◆ start_write() [2/2]

txn_managed mdbx::env::start_write ( txn & parent)
inline

Starts write (read-write) transaction.

◆ starts_with()

bool mdbx::slice::starts_with ( const slice & prefix) const
constexprnoexcept

Checks if the data starts with the given prefix.

◆ success_or_throw() [1/4]

void mdbx::error::success_or_throw ( ) const
inline

◆ success_or_throw() [2/4]

void mdbx::error::success_or_throw ( const exception_thunk & thunk) const
inline

◆ success_or_throw() [3/4]

void mdbx::error::success_or_throw ( int error_code,
const exception_thunk & thunk )
inlinestatic

◆ success_or_throw() [4/4]

void mdbx::error::success_or_throw ( MDBX_error_t error_code)
inlinestatic

◆ sync_period__seconds_16dot16()

unsigned mdbx::env::sync_period__seconds_16dot16 ( ) const
inline

Gets relative period since the last unsteady commit that used to force flush the data buffers to disk, for non-sync durability modes.

The relative period value affects all processes which operates with given environment until the last process close environment or a new value will be settled. Data is always written to disk when txn_managed::commit() is called, but the operating system may keep it buffered. MDBX always flushes the OS buffers upon commit as well, unless the environment was opened with env::durability::whole_fragile, env::durability::lazy_weak_tail or in part env::durability::half_synchronous_weak_last. The settled period is not checked asynchronously, but only by the txn_managed::commit() and env::sync_to_disk() functions. Therefore, in cases where transactions are committed infrequently and/or irregularly, polling by env::poll_sync_to_disk() may be a reasonable solution to timeout enforcement.

The default is 0, which means that no timeout is checked and no additional flush will be made.

See also
extra_runtime_option::sync_period
set_sync_period(const duration&)
extra_runtime_option::sync_period
sync_period__seconds_16dot16(unsigned)

◆ sync_period__seconds_double()

double mdbx::env::sync_period__seconds_double ( ) const
inline

Gets relative period since the last unsteady commit that used to force flush the data buffers to disk, for non-sync durability modes.

The relative period value affects all processes which operates with given environment until the last process close environment or a new value will be settled. Data is always written to disk when txn_managed::commit() is called, but the operating system may keep it buffered. MDBX always flushes the OS buffers upon commit as well, unless the environment was opened with env::durability::whole_fragile, env::durability::lazy_weak_tail or in part env::durability::half_synchronous_weak_last. The settled period is not checked asynchronously, but only by the txn_managed::commit() and env::sync_to_disk() functions. Therefore, in cases where transactions are committed infrequently and/or irregularly, polling by env::poll_sync_to_disk() may be a reasonable solution to timeout enforcement.

The default is 0, which means that no timeout is checked and no additional flush will be made.

See also
extra_runtime_option::sync_period
set_sync_period(const duration&)
extra_runtime_option::sync_period
set_sync_period__seconds_double(double)

◆ sync_threshold()

size_t mdbx::env::sync_threshold ( ) const
inline

Gets threshold used to force flush the data buffers to disk, for non-sync durability modes.

The threshold value affects all processes which operates with given environment until the last process close environment or a new value will be settled. Data is always written to disk when txn_managed::commit() is called, but the operating system may keep it buffered. MDBX always flushes the OS buffers upon commit as well, unless the environment was opened with env::durability::whole_fragile, env::durability::lazy_weak_tail or in part env::durability::half_synchronous_weak_last.

The default is 0, which means that no threshold is checked and no additional flush will be made.

See also
extra_runtime_option::sync_bytes
extra_runtime_option::sync_bytes

◆ sync_to_disk()

bool mdbx::env::sync_to_disk ( bool force = true,
bool nonblock = false )
inline

Flush the environment data buffers.

Returns
True if sync done or no data to sync; false if the environment is busy by another thread and nonblock=true is used.

◆ tail()

slice mdbx::slice::tail ( size_t n) const
constexprnoexcept

Returns the last "n" bytes of the slice.

Precondition
REQUIRES: n <= size()

◆ thread_register()

void mdbx::env::thread_register ( )
inline

Registers the current thread as a reader for the environment, i.e. assigns a reader slot.

◆ thread_unregister()

void mdbx::env::thread_unregister ( )
inline

Unregisters the current thread, i.e. releases its reader slot.

◆ throw_exception()

void mdbx::error::throw_exception ( int error_code)
inlinestatic

◆ throw_on_failure() [1/2]

void mdbx::error::throw_on_failure ( ) const
inline

◆ throw_on_failure() [2/2]

void mdbx::error::throw_on_failure ( int error_code)
inlinestatic

◆ throw_on_nullptr()

void mdbx::error::throw_on_nullptr ( const void * ptr,
MDBX_error_t error_code )
inlinestatic

◆ transaction_size_max()

size_t mdbx::env::limits::transaction_size_max ( intptr_t pagesize)
inlinestatic

Returns the maximal write transaction size (i.e. limit for summary volume of dirty pages) in bytes for specified page size.

◆ try_insert() [1/2]

value_result mdbx::cursor::try_insert ( const slice & key,
slice value )
inline

◆ try_insert() [2/2]

value_result mdbx::txn::try_insert ( map_handle map,
const slice & key,
slice value )
inline

◆ try_insert_reserve() [1/2]

value_result mdbx::cursor::try_insert_reserve ( const slice & key,
size_t value_length )
inline

◆ try_insert_reserve() [2/2]

value_result mdbx::txn::try_insert_reserve ( map_handle map,
const slice & key,
size_t value_length )
inline

◆ try_start_write()

txn_managed mdbx::env::try_start_write ( )
inline

Tries to start write (read-write) transaction without blocking.

◆ try_update() [1/2]

bool mdbx::cursor::try_update ( const slice & key,
const slice & value )
inline

◆ try_update() [2/2]

bool mdbx::txn::try_update ( map_handle map,
const slice & key,
const slice & value )
inline

◆ try_update_reserve() [1/2]

value_result mdbx::cursor::try_update_reserve ( const slice & key,
size_t value_length )
inline

◆ try_update_reserve() [2/2]

value_result mdbx::txn::try_update_reserve ( map_handle map,
const slice & key,
size_t value_length )
inline

◆ turn_for_recovery()

void mdbx::env::turn_for_recovery ( unsigned target_meta)
inline

Turns the database to the specified meta-page.

Mostly an internal API for the mdbx_chk utility and subject to change; use only when you know what you are doing. See env_managed::open_for_recovery().

See also
mdbx_env_turn_for_recovery()

◆ txn() [3/3]

txn mdbx::cursor::txn ( ) const
inline

Returns the cursor's transaction.

◆ txn_lock()

bool mdbx::env::txn_lock ( bool dont_wait = false)
inline

Acquires write-transaction lock.

Provided for custom and/or complex locking scenarios, see mdbx_txn_lock(). Callers MUST NOT hold any write transaction while holding the lock.

Parameters
[in]dont_waitIf true, does not block and returns false immediately when the lock is held by another thread or process.
Returns
True if the lock was acquired, false otherwise.
See also
txn_unlock()
mdbx_txn_lock()

◆ txn_unlock()

void mdbx::env::txn_unlock ( )
inline

Releases write-transaction lock acquired by txn_lock().

See also
txn_lock()
mdbx_txn_unlock()

◆ unbind()

void mdbx::cursor::unbind ( )
inline

Unbind cursor from a transaction.

◆ unpark_reading()

bool mdbx::txn::unpark_reading ( bool restart_if_ousted = true)
inline

Resume parked read-only transaction.

Returns
True if transaction was restarted while restart_if_ousted=true.

◆ update() [1/2]

void mdbx::cursor::update ( const slice & key,
const slice & value )
inline

◆ update() [2/2]

void mdbx::txn::update ( map_handle map,
const slice & key,
const slice & value )
inline

◆ update_reserve() [1/2]

slice mdbx::cursor::update_reserve ( const slice & key,
size_t value_length )
inline

◆ update_reserve() [2/2]

slice mdbx::txn::update_reserve ( map_handle map,
const slice & key,
size_t value_length )
inline

◆ upper_bound()

cursor::move_result mdbx::cursor::upper_bound ( const slice & key,
bool throw_notfound = false )
inline

◆ upper_bound_multivalue()

cursor::move_result mdbx::cursor::upper_bound_multivalue ( const slice & key,
const slice & value,
bool throw_notfound = false )
inline

◆ upsert() [1/2]

void mdbx::cursor::upsert ( const slice & key,
const slice & value )
inline

◆ upsert() [2/2]

void mdbx::txn::upsert ( map_handle map,
const slice & key,
const slice & value )
inline

◆ upsert_reserve() [1/2]

slice mdbx::cursor::upsert_reserve ( const slice & key,
size_t value_length )
inline

◆ upsert_reserve() [2/2]

slice mdbx::txn::upsert_reserve ( map_handle map,
const slice & key,
size_t value_length )
inline

◆ valsize4page_max() [1/4]

size_t mdbx::env::limits::valsize4page_max ( const env & env,
MDBX_db_flags_t flags )
inlinestatic

Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for given environment and table flags.

◆ valsize4page_max() [2/4]

size_t mdbx::env::limits::valsize4page_max ( const env & env,
value_mode mode )
inlinestatic

Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for given environment and values mode.

◆ valsize4page_max() [3/4]

size_t mdbx::env::limits::valsize4page_max ( intptr_t pagesize,
MDBX_db_flags_t flags )
inlinestatic

Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for specified size and table flags.

◆ valsize4page_max() [4/4]

size_t mdbx::env::limits::valsize4page_max ( intptr_t pagesize,
value_mode mode )
inlinestatic

Returns maximal data size in bytes to fit in a leaf-page or single large/overflow-page for specified page size and values mode.

◆ value_max() [1/4]

size_t mdbx::env::limits::value_max ( const env & env,
MDBX_db_flags_t flags )
inlinestatic

Returns the maximal value size in bytes for given environment and table flags.

◆ value_max() [2/4]

size_t mdbx::env::limits::value_max ( const env & env,
value_mode mode )
inlinestatic

Returns the maximal value size in bytes for given environment and values mode.

◆ value_max() [3/4]

size_t mdbx::env::limits::value_max ( intptr_t pagesize,
MDBX_db_flags_t flags )
inlinestatic

Returns the maximal value size in bytes for specified page size and table flags.

◆ value_max() [4/4]

size_t mdbx::env::limits::value_max ( intptr_t pagesize,
value_mode mode )
inlinestatic

Returns the maximal value size in bytes for specified page size and values mode.

◆ value_min() [1/2]

size_t mdbx::env::limits::value_min ( MDBX_db_flags_t flags)
inlinestaticnoexcept

Returns the minimal values size in bytes for specified table flags.

◆ value_min() [2/2]

size_t mdbx::env::limits::value_min ( value_mode mode)
inlinestaticnoexcept

Returns the minimal values size in bytes for specified values mode.

◆ value_mode()

MDBX_CXX11_CONSTEXPR_ENUM mdbx::value_mode mdbx::map_handle::info::value_mode ( ) const
noexcept

◆ warmup()

int mdbx::env::warmup ( MDBX_warmup_flags_t flags,
unsigned timeout_seconds_16dot16,
const MDBX_txn * txn = nullptr ) const
inline

Loads into memory the given pages of the database and their on-disk neighbours in advance.

Returns
MDBX_RESULT_TRUE if the specified timeout is reached during loading data into memory, MDBX_SUCCESS on success.
See also
mdbx_env_warmup()

◆ whole_fragile()

env::operate_parameters & mdbx::env::operate_parameters::whole_fragile ( )
constexprnoexcept

Sets the durability level to env::durability::whole_fragile.

◆ write_file_io()

env::operate_parameters & mdbx::env::operate_parameters::write_file_io ( )
constexprnoexcept

Sets the operation mode to env::mode::write_file_io.

◆ write_mapped_io()

env::operate_parameters & mdbx::env::operate_parameters::write_mapped_io ( )
constexprnoexcept

Sets the operation mode to env::mode::write_mapped_io.

Variable Documentation

◆ buffer

template<class ALLOCATOR = default_allocator, class CAPACITY_POLICY = default_capacity_policy>
class MDBX_MSVC_DECLSPEC_EMPTY_BASES mdbx::buffer