1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! GrumpyDB — A disk-based object storage engine.
//!
//! GrumpyDB stores schema-less documents (JSON-like) on disk with B+Tree indexing,
//! page-based storage, WAL for durability, and SWMR concurrency.
//!
//! # Example
//!
//! ```no_run
//! use grumpydb::{GrumpyDb, Value};
//! use uuid::Uuid;
//! use std::collections::BTreeMap;
//!
//! let mut db = GrumpyDb::open(std::path::Path::new("./my_database")).unwrap();
//!
//! let key = Uuid::new_v4();
//! let value = Value::Object(BTreeMap::from([
//! ("name".into(), Value::String("GrumpyDB".into())),
//! ("version".into(), Value::Integer(1)),
//! ]));
//!
//! db.insert(key, value).unwrap();
//!
//! let doc = db.get(&key).unwrap();
//! assert!(doc.is_some());
//! db.close().unwrap();
//! ```
pub use SharedDb;
pub use Database;
pub use Value;
pub use ;
pub use ;
pub use IndexDefinition;