Expand description
RainDB is a key-value store that is based on LevelDB. This project aims to be a learning tool for
those looking to take a deep dive on databases. It strives to uphold a high standard of code clarity
and to have extensive documentation on design and intentions of code. With regard to this, we have
configured the project such that rustdoc
generates output even for private methods.
Please see the RainDB repo for more in-depth treatment on the design and operation of the database.
Re-exports
pub use db::DB;
pub use errors::RainDBError;
pub use errors::RainDBResult;
pub use filter_policy::BloomFilterPolicy;
pub use filter_policy::FilterPolicy;
pub use options::DbOptions;
pub use options::ReadOptions;
pub use options::WriteOptions;
pub use snapshots::Snapshot;
Modules
batch 🔒
This module contains representations and utility functions for batch functions.
This module contains abstractions used in compaction operations. Core to this is the
CompactionWorker
worker thread.config 🔒
This module contains global configuration constants for RainDB.
The database module contains the primary API for interacting with the key-value store.
This module contains error types specific to RainDB as well as wrappers and
From
implementations
for common errors to enable error propagation.This module contains utilities for managing file names used by the database.
This module provides a common interface for filter policies that can be provided at database
startup. A filter policy is an object used to create a small filter from a set of keys. These
filters are stored and consulted during reads to determine whether or not to read information from
disk. This can have significant speed savings from removing unnecessary disk seeks on database get
operations.
This module contains abstractions for file systems.
iterator 🔒
key 🔒
This module contains implementations of keys used to index values in the RainDB. There are two main
keys that are used:
logs 🔒
The log file format is used by both write-ahead logs and manifest files (a.k.a. descriptor logs).
memtable 🔒
This module holds the various option structures that can be passed to RainDB operations
Snapshots are used to scope a request to the state of a database at a point in time.
This module provides a thread-safe table cache.
tables 🔒
utils 🔒
This module contains the database versioning abstractions.
Structs
A set of operations to perform atomically.
Element of a batch operation.
Enums
The operation that is being applied to an entry in the database.
Traits
A cache that stores mappings from keys to values.
A RainDB specific iterator implementation that has more cursor-like behavior.