Skip to content

Group value2key

Modules > value2key

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

Public Functions

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

Detailed Description

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

Public Functions Documentation

function mdbx_key_from_double

LIBMDBX_API uint64_t mdbx_key_from_double (
    const double ieee754_64bit
) 

function mdbx_key_from_float

LIBMDBX_API uint32_t mdbx_key_from_float (
    const float ieee754_32bit
) 

function mdbx_key_from_int32

inline uint32_t mdbx_key_from_int32 (
    const int32_t i32
) 

function mdbx_key_from_int64

inline uint64_t mdbx_key_from_int64 (
    const int64_t i64
) 

function mdbx_key_from_jsonInteger

LIBMDBX_API uint64_t mdbx_key_from_jsonInteger (
    const int64_t json_integer
) 

function mdbx_key_from_ptrdouble

LIBMDBX_API uint64_t mdbx_key_from_ptrdouble (
    const double *const ieee754_64bit
) 

function mdbx_key_from_ptrfloat

LIBMDBX_API uint32_t mdbx_key_from_ptrfloat (
    const float *const ieee754_32bit
)