libmdbx (2023-01-18T18:34:52+03:00)
One of the fastest compact embeddable key-value ACID database without WAL.
Value-to-Key functions

Value-to-Key functions to avoid using custom comparators. More...


LIBMDBX_API uint64_t mdbx_key_from_jsonInteger (const int64_t json_integer)
LIBMDBX_API uint64_t mdbx_key_from_double (const double ieee754_64bit)
LIBMDBX_API uint64_t mdbx_key_from_ptrdouble (const double *const ieee754_64bit)
LIBMDBX_API uint32_t mdbx_key_from_float (const float ieee754_32bit)
LIBMDBX_API uint32_t mdbx_key_from_ptrfloat (const float *const ieee754_32bit)
uint64_t mdbx_key_from_int64 (const int64_t i64)
uint32_t mdbx_key_from_int32 (const int32_t i32)

Detailed Description

Value-to-Key functions to avoid using custom comparators.

See also
Key-to-Value functions

The mdbx_key_from_jsonInteger() build a keys which are comparable with keys created by mdbx_key_from_double(). So this allows mixing int64_t and IEEE754 double values in one index for JSON-numbers with restriction for integer numbers range corresponding to RFC-7159, i.e. \([-2^{53}+1, 2^{53}-1]\). See bottom of page 6 at

Function Documentation

◆ mdbx_key_from_double()

LIBMDBX_API uint64_t mdbx_key_from_double ( const double  ieee754_64bit)

◆ mdbx_key_from_float()

LIBMDBX_API uint32_t mdbx_key_from_float ( const float  ieee754_32bit)

◆ mdbx_key_from_int32()

uint32_t mdbx_key_from_int32 ( const int32_t  i32)

◆ mdbx_key_from_int64()

uint64_t mdbx_key_from_int64 ( const int64_t  i64)

◆ mdbx_key_from_jsonInteger()

LIBMDBX_API uint64_t mdbx_key_from_jsonInteger ( const int64_t  json_integer)

◆ mdbx_key_from_ptrdouble()

LIBMDBX_API uint64_t mdbx_key_from_ptrdouble ( const double *const  ieee754_64bit)

◆ mdbx_key_from_ptrfloat()

LIBMDBX_API uint32_t mdbx_key_from_ptrfloat ( const float *const  ieee754_32bit)