Skip to content

Latest commit

 

History

History
53 lines (29 loc) · 1.99 KB

File metadata and controls

53 lines (29 loc) · 1.99 KB

sdb

a user-friendly wrapper for sanakirja database

sanakirja a key can have multiple values , this is different from the other k-v databases .

about

sanakirja author is Pierre-Étienne Meunier .

see Sanakirja 1.0 (pure Rust transactional on-disk key-value store) released!

Sanakirja is at least 10 times faster than Sled in my (sequential) benchmarks, and even 20%-50% faster than LMDB (the fastest C equivalent) in the same benchmarks. Also, I started it when there was no real alternative (Sled didn't exist at the time).

I wrapper it for easy use .

First step : static define db , see tests/db.rs

I use static_init = {git="https://gitlab.com/vkahl/static_init.git"} for static init ( use git version because of bug ) . You can use lazy_static instead .

#include ./sdb/tests/db.rs

Second step : use it , see tests/main.rs

#include ./sdb/tests/main.rs

db method you can see src/dbpage.rs

#include ./sdb/src/dbpage.rs

sanakirja

Copy-on-write datastructures, storable on disk (or elsewhere) with a stable format.