libmdbx  0.11.9.0 (2022-08-02T12:00:30+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

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 https://tools.ietf.org/html/rfc7159

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)
inline

◆ mdbx_key_from_int64()

uint64_t mdbx_key_from_int64 ( const int64_t  i64)
inline

◆ 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)