#include <cstddef>
#include <cstring>
#include <lmdb.h>
#include <type_traits>
#include <utility>
#include "span.h"
Go to the source code of this file.
|
| template<typename T > |
| using | lmdb::native_type = typename std::conditional< std::is_enum< T >::value, std::underlying_type< T >, identity< T > >::type::type |
| |
◆ ELECTRONEUM_COMPARE
| #define ELECTRONEUM_COMPARE |
( |
|
obj, |
|
|
|
field |
|
) |
| |
Value: decltype(std::declval<obj>().field), \
offsetof(obj, field) \
>
int compare(MDB_val const *left, MDB_val const *right) noexcept
Expands to lmdb::compare for the value field within obj.
Definition at line 51 of file util.h.
◆ ELECTRONEUM_FIELD
| #define ELECTRONEUM_FIELD |
( |
|
obj, |
|
|
|
field |
|
) |
| obj , decltype(std::declval<obj>().field) , offsetof(obj, field) |
Calculates types and offset of struct field. Use in template arguments for table::get_value, value_iterator::get_value, value_stream::make_iterator, or value_stream::make_range.
Definition at line 40 of file util.h.
◆ ELECTRONEUM_SORT_BY
| #define ELECTRONEUM_SORT_BY |
( |
|
obj, |
|
|
|
field |
|
) |
| |
Value: lmdb::native_type<decltype(std::declval<obj>().field)>, \
offsetof(obj, field) \
>
int less(MDB_val const *left, MDB_val const *right) noexcept
Expands to lmdb::less for the value field within obj.
Definition at line 44 of file util.h.