NuDB Logo

PrevUpHomeNext

basic_store

A high performance, insert-only key/value database for SSDs.

Synopsis
template<
    class Hasher,
    class File>
class basic_store
Types

Name

Description

file_type

hash_type

Member Functions

Name

Description

appnum

Return the appnum associated with the database.

basic_store

Default constructor.

Copy constructor (disallowed)

block_size

Return the block size associated with the database.

close

Close the database.

dat_path

Return the path to the data file.

fetch

Fetch a value.

insert

Insert a value.

is_open

Returns true if the database is open.

key_path

Return the path to the key file.

key_size

Return the key size associated with the database.

log_path

Return the path to the log file.

open

Open a database.

operator=

Copy assignment (disallowed)

set_burst

Set the burst size.

~basic_store

Destroy the database.

Description

To create a database first call the create free function. Then construct a basic_store and call basic_store::open on it:

error_code ec;
create<xxhasher>(
    "db.dat", "db.key", "db.log",
        1, make_salt(), 8, 4096, 0.5f, ec);
basic_store<xxhasher, native_file> db;
db.open("db.dat", "db.key", "db.log", ec);
Template Parameters

Type

Description

Hasher

The hash function to use. This type must meet the requirements of Hasher.

File

The type of File object to use. This type must meet the requirements of File.

Header

#include <nudb/basic_store.hpp>


PrevUpHomeNext