NuDB Logo

PrevUpHomeNext

basic_store::open

Open a database.

template<
    class... Args>
void
open(
    path_type const& dat_path,
    path_type const& key_path,
    path_type const& log_path,
    error_code& ec,
    Args&&... args);

The database identified by the specified data, key, and log file paths is opened. If a log file is present, the recovery mechanism is invoked to restore database integrity before the function returns.

Requirements

The database must be not be open.

Thread safety

Not thread safe. The caller is responsible for ensuring that no other member functions are called concurrently.

Parameters

dat_path

The path to the data file.

key_path

The path to the key file.

log_path

The path to the log file.

ec

Set to the error, if any occurred.

args

Optional arguments passed to File constructors.


PrevUpHomeNext