libmdbx  0.11.6.39 (2022-04-13T11:05:50+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...

Functions

MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_jsonInteger (const int64_t json_integer)
 
MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_double (const double ieee754_64bit)
 
MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_ptrdouble (const double *const ieee754_64bit)
 
MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint32_t mdbx_key_from_float (const float ieee754_32bit)
 
MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API uint32_t mdbx_key_from_ptrfloat (const float *const ieee754_32bit)
 
MDBX_NOTHROW_CONST_FUNCTION uint64_t mdbx_key_from_int64 (const int64_t i64)
 
MDBX_NOTHROW_CONST_FUNCTION 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 https://tools.ietf.org/html/rfc7159

Function Documentation

◆ mdbx_key_from_double()

MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_double ( const double  ieee754_64bit)

◆ mdbx_key_from_float()

MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint32_t mdbx_key_from_float ( const float  ieee754_32bit)

◆ mdbx_key_from_int32()

MDBX_NOTHROW_CONST_FUNCTION uint32_t mdbx_key_from_int32 ( const int32_t  i32)
inline

◆ mdbx_key_from_int64()

MDBX_NOTHROW_CONST_FUNCTION uint64_t mdbx_key_from_int64 ( const int64_t  i64)
inline

◆ mdbx_key_from_jsonInteger()

MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_jsonInteger ( const int64_t  json_integer)

◆ mdbx_key_from_ptrdouble()

MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_ptrdouble ( const double *const  ieee754_64bit)

◆ mdbx_key_from_ptrfloat()

MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API uint32_t mdbx_key_from_ptrfloat ( const float *const  ieee754_32bit)