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) |
Value-to-Key functions to avoid using custom comparators.
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
MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_double | ( | const double | ieee754_64bit | ) |
MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint32_t mdbx_key_from_float | ( | const float | ieee754_32bit | ) |
|
inline |
|
inline |
MDBX_NOTHROW_CONST_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_jsonInteger | ( | const int64_t | json_integer | ) |
MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API uint64_t mdbx_key_from_ptrdouble | ( | const double *const | ieee754_64bit | ) |
MDBX_NOTHROW_PURE_FUNCTION LIBMDBX_API uint32_t mdbx_key_from_ptrfloat | ( | const float *const | ieee754_32bit | ) |