MDBX Containers
Loading...
Searching...
No Matches
mdbxc::Config Class Reference

Parameters used by Connection to create the MDBX environment. More...

#include <Config.hpp>

Public Member Functions

bool validate () const
 Validate the MDBX configuration.
 

Public Attributes

std::string pathname
 Path to the database file or directory containing the database.
 
int64_t size_lower = -1
 Lower bound for database size.
 
int64_t size_now = -1
 Current size of the database.
 
int64_t size_upper = -1
 Upper bound for database size.
 
int64_t growth_step = 16 * 1024 * 1024
 Step size for database growth.
 
int64_t shrink_threshold = 16 * 1024 * 1024
 Threshold for database shrinking.
 
int64_t page_size = 0
 Page size (must be a power of two).
 
int64_t max_readers = 0
 Maximum reader slots; use 0 for the default (twice the CPU count).
 
int64_t max_dbs = 10
 Maximum number of named databases (DBI) in the environment.
 
bool read_only = false
 Whether to open the environment in read-only mode.
 
bool readahead = true
 Whether to enable OS readahead for sequential access.
 
bool no_subdir = true
 Whether to store the database in a single file instead of a directory.
 
bool sync_durable = true
 Whether to enforce synchronous durable writes (MDBX_SYNC_DURABLE).
 
bool writemap_mode = false
 Whether to map the database with MDBX_WRITEMAP for direct modification.
 
bool relative_to_exe = false
 Whether to resolve a relative path relative to the executable directory.
 

Detailed Description

Parameters used by Connection to create the MDBX environment.

Each option corresponds to an MDBX flag or setting. See Database Configuration for a detailed description of how these values influence the database.

Definition at line 17 of file Config.hpp.

Member Function Documentation

◆ validate()

bool mdbxc::Config::validate ( ) const
inline

Validate the MDBX configuration.

Returns
True if the configuration is valid, false otherwise.

Definition at line 37 of file Config.hpp.

Member Data Documentation

◆ growth_step

int64_t mdbxc::Config::growth_step = 16 * 1024 * 1024

Step size for database growth.

Definition at line 23 of file Config.hpp.

◆ max_dbs

int64_t mdbxc::Config::max_dbs = 10

Maximum number of named databases (DBI) in the environment.

Definition at line 27 of file Config.hpp.

◆ max_readers

int64_t mdbxc::Config::max_readers = 0

Maximum reader slots; use 0 for the default (twice the CPU count).

Definition at line 26 of file Config.hpp.

◆ no_subdir

bool mdbxc::Config::no_subdir = true

Whether to store the database in a single file instead of a directory.

Definition at line 30 of file Config.hpp.

◆ page_size

int64_t mdbxc::Config::page_size = 0

Page size (must be a power of two).

Definition at line 25 of file Config.hpp.

◆ pathname

std::string mdbxc::Config::pathname

Path to the database file or directory containing the database.

Definition at line 19 of file Config.hpp.

◆ read_only

bool mdbxc::Config::read_only = false

Whether to open the environment in read-only mode.

Definition at line 28 of file Config.hpp.

◆ readahead

bool mdbxc::Config::readahead = true

Whether to enable OS readahead for sequential access.

Definition at line 29 of file Config.hpp.

◆ relative_to_exe

bool mdbxc::Config::relative_to_exe = false

Whether to resolve a relative path relative to the executable directory.

Definition at line 33 of file Config.hpp.

◆ shrink_threshold

int64_t mdbxc::Config::shrink_threshold = 16 * 1024 * 1024

Threshold for database shrinking.

Definition at line 24 of file Config.hpp.

◆ size_lower

int64_t mdbxc::Config::size_lower = -1

Lower bound for database size.

Definition at line 20 of file Config.hpp.

◆ size_now

int64_t mdbxc::Config::size_now = -1

Current size of the database.

Definition at line 21 of file Config.hpp.

◆ size_upper

int64_t mdbxc::Config::size_upper = -1

Upper bound for database size.

Definition at line 22 of file Config.hpp.

◆ sync_durable

bool mdbxc::Config::sync_durable = true

Whether to enforce synchronous durable writes (MDBX_SYNC_DURABLE).

Definition at line 31 of file Config.hpp.

◆ writemap_mode

bool mdbxc::Config::writemap_mode = false

Whether to map the database with MDBX_WRITEMAP for direct modification.

Definition at line 32 of file Config.hpp.


The documentation for this class was generated from the following file: