fluxen 1.1.1
Single-header embedded key-value store for C++20
Loading...
Searching...
No Matches
fluxen.hpp File Reference
#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <functional>
#include <mutex>
#include <optional>
#include <shared_mutex>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_map>
#include <vector>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>

Go to the source code of this file.

Classes

class  fluxen::Tx
 A staged batch of write operations, used inside DB::transaction(). More...
class  fluxen::DB
 A persistent key-value database backed by a single file. More...

Typedefs

using fluxen::Bytes = std::span<const std::byte>
 A non-owning view of raw bytes in the memory-mapped file.

Enumerations

enum  fluxen::TxResult : uint8_t { commit , rollback }
 Controls whether a transaction's operations are applied or discarded. More...

Typedef Documentation

◆ Bytes

using fluxen::Bytes = std::span<const std::byte>

A non-owning view of raw bytes in the memory-mapped file.

Returned by the each() and prefix() iteration callbacks. The span remains valid until the next write operation or compact() call, so copy the data out if you need to keep it longer.

Enumeration Type Documentation

◆ TxResult

enum fluxen::TxResult : uint8_t

Controls whether a transaction's operations are applied or discarded.

Returned by the callback passed to DB::transaction().

See also
DB::transaction()