Group cxx_core
Classes
| Type | Name |
|---|---|
| class | mdbx::cache_entry Cache entry for the transparent read-your-writes caching, see txn::get_cached() andmdbx_cache_get() . |
| class | mdbx::cursor Unmanaged cursor. |
| class | mdbx::cursor_managed Managed cursor. |
| class | mdbx::env Unmanaged database environment. |
| class | mdbx::env_managed Managed database environment. |
| struct | mdbx::map_handle A handle for an individual table (aka key-value space, maps or sub-database) in the environment. |
| class | mdbx::txn Unmanaged database transaction. |
| class | mdbx::txn_managed Managed database transaction. |
Public Types
| Type | Name |
|---|---|
| typedef ::MDBX_cmp_func | comparator |
| typedef env_managed::create_parameters | create_parameters Shorthand for env_managed::create_parameters . |
| typedef env::geometry | geometry Shorthand for env::geometry . |
| enum | key_mode Kinds of the keys and corresponding modes of comparing it. |
| enum | loop_control Loop control constants for readers enumeration functor and other cases. |
| typedef env::operate_options | operate_options Shorthand for env::operate_options . |
| typedef env::operate_parameters | operate_parameters Shorthand for env::operate_parameters . |
| enum | put_mode Key-value pairs put mode. |
| typedef env::reclaiming_options | reclaiming_options Shorthand for env::reclaiming_options . |
| enum | value_mode Kind of the values and sorted multi-values with corresponding comparison. |
Public Functions
| Type | Name |
|---|---|
| comparator | default_comparator (key_mode mode) noexcept |
| comparator | default_comparator (value_mode mode) noexcept |
| MDBX_cmp_func | get_datacmp (MDBX_db_flags_t flags) Returns the built-in data (value) comparator for the given table flags, which is useful as a fallback when implementing custom comparators. |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_msgpack (key_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_msgpack (value_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_multi (value_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_ordinal (key_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_ordinal (value_mode mode) noexcept |
| bool | is_readahead_reasonable (size_t volume, intptr_t redundancy) Quickly finds out whether readahead is reasonable for the given data volume and redundancy. |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_reverse (key_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_reverse (value_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_samelength (key_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_samelength (value_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_usual (key_mode mode) noexcept |
| MDBX_CXX01_CONSTEXPR_ENUM bool | is_usual (value_mode mode) noexcept |
| inline ::std::string | ratio2digits (uint64_t numerator, uint64_t denominator, int precision) Converts a fraction to a string of decimal digits without using floating-point operations. |
| inline ::std::string | ratio2percents (uint64_t value, uint64_t whole) Converts a fraction to a percentage string without using floating-point operations. |
| void | set_panic (MDBX_panic_func func) Sets a callback for assertion failures, called before printing the message and aborting. |
| int | setup_debug (MDBX_log_level_t log_level=MDBX_LOG_DONTCHANGE, MDBX_debug_flags_t debug_flags=MDBX_DBG_DONTCHANGE, MDBX_debug_func logger=nullptr) Sets up the global log-level, debug options and logger. |
| int | setup_debug_nofmt (MDBX_log_level_t log_level, MDBX_debug_flags_t debug_flags, MDBX_debug_func_nofmt logger, char * logger_buffer, size_t logger_buffer_size) Sets up the global log-level, debug options and a logger for plain preformatted messages. |
Public Types Documentation
typedef comparator
using mdbx::comparator = ::MDBX_cmp_func;
typedef create_parameters
Shorthand for env_managed::create_parameters .
using mdbx::create_parameters = env_managed::create_parameters;
typedef geometry
Shorthand for env::geometry .
using mdbx::geometry = env::geometry;
enum key_mode
Kinds of the keys and corresponding modes of comparing it.
enum key_mode {
usual = MDBX_DB_DEFAULTS,
reverse = MDBX_REVERSEKEY,
ordinal = MDBX_INTEGERKEY,
msgpack = -1
};
enum loop_control
Loop control constants for readers enumeration functor and other cases.
enum loop_control {
continue_loop = 0,
exit_loop = INT32_MIN
};
See also: env::enumerate_readers()
typedef operate_options
Shorthand for env::operate_options .
using mdbx::operate_options = env::operate_options;
typedef operate_parameters
Shorthand for env::operate_parameters .
using mdbx::operate_parameters = env::operate_parameters;
enum put_mode
Key-value pairs put mode.
enum put_mode {
insert_unique = MDBX_NOOVERWRITE,
upsert = MDBX_UPSERT,
update = MDBX_CURRENT
};
typedef reclaiming_options
Shorthand for env::reclaiming_options .
using mdbx::reclaiming_options = env::reclaiming_options;
enum value_mode
Kind of the values and sorted multi-values with corresponding comparison.
enum value_mode {
single = MDBX_DB_DEFAULTS,
multi = MDBX_DUPSORT,
multi_reverse = MDBX_DUPSORT | MDBX_REVERSEDUP,
multi_samelength = MDBX_DUPSORT | MDBX_DUPFIXED,
multi_ordinal = MDBX_DUPSORT | MDBX_DUPFIXED | MDBX_INTEGERDUP,
multi_reverse_samelength =
MDBX_DUPSORT | MDBX_REVERSEDUP | MDBX_DUPFIXED,
msgpack = -1
};
Public Functions Documentation
function default_comparator
inline comparator default_comparator (
key_mode mode
) noexcept
function default_comparator
inline comparator default_comparator (
value_mode mode
) noexcept
function get_datacmp
Returns the built-in data (value) comparator for the given table flags, which is useful as a fallback when implementing custom comparators.
inline MDBX_cmp_func get_datacmp (
MDBX_db_flags_t flags
)
See also: mdbx_get_datacmp()
function is_msgpack
MDBX_CXX01_CONSTEXPR_ENUM bool is_msgpack (
key_mode mode
) noexcept
function is_msgpack
MDBX_CXX01_CONSTEXPR_ENUM bool is_msgpack (
value_mode mode
) noexcept
function is_multi
MDBX_CXX01_CONSTEXPR_ENUM bool is_multi (
value_mode mode
) noexcept
function is_ordinal
MDBX_CXX01_CONSTEXPR_ENUM bool is_ordinal (
key_mode mode
) noexcept
function is_ordinal
MDBX_CXX01_CONSTEXPR_ENUM bool is_ordinal (
value_mode mode
) noexcept
function is_readahead_reasonable
Quickly finds out whether readahead is reasonable for the given data volume and redundancy.
inline bool is_readahead_reasonable (
size_t volume,
intptr_t redundancy
)
See also: mdbx_is_readahead_reasonable()
function is_reverse
MDBX_CXX01_CONSTEXPR_ENUM bool is_reverse (
key_mode mode
) noexcept
function is_reverse
MDBX_CXX01_CONSTEXPR_ENUM bool is_reverse (
value_mode mode
) noexcept
function is_samelength
MDBX_CXX01_CONSTEXPR_ENUM bool is_samelength (
key_mode mode
) noexcept
function is_samelength
MDBX_CXX01_CONSTEXPR_ENUM bool is_samelength (
value_mode mode
) noexcept
function is_usual
MDBX_CXX01_CONSTEXPR_ENUM bool is_usual (
key_mode mode
) noexcept
function is_usual
MDBX_CXX01_CONSTEXPR_ENUM bool is_usual (
value_mode mode
) noexcept
function ratio2digits
Converts a fraction to a string of decimal digits without using floating-point operations.
inline ::std::string ratio2digits (
uint64_t numerator,
uint64_t denominator,
int precision
)
See also: mdbx_ratio2digits()
function ratio2percents
Converts a fraction to a percentage string without using floating-point operations.
inline ::std::string ratio2percents (
uint64_t value,
uint64_t whole
)
See also: mdbx_ratio2percents()
function set_panic
Sets a callback for assertion failures, called before printing the message and aborting.
inline void set_panic (
MDBX_panic_func func
)
See also: mdbx_set_panic()
function setup_debug
Sets up the global log-level, debug options and logger.
inline int setup_debug (
MDBX_log_level_t log_level=MDBX_LOG_DONTCHANGE,
MDBX_debug_flags_t debug_flags=MDBX_DBG_DONTCHANGE,
MDBX_debug_func logger=nullptr
)
Returns:
A non-negative value on success (previous settings packed into the low 16 bits and high 16 bits), or a negative error.
See also: mdbx_setup_debug()
function setup_debug_nofmt
Sets up the global log-level, debug options and a logger for plain preformatted messages.
inline int setup_debug_nofmt (
MDBX_log_level_t log_level,
MDBX_debug_flags_t debug_flags,
MDBX_debug_func_nofmt logger,
char * logger_buffer,
size_t logger_buffer_size
)
Returns:
A non-negative value on success, or a negative error.
See also: mdbx_setup_debug_nofmt()