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
47
48
49
50
51
52
53
54
55
56
/*!
GhalaDb is a key value datastore that implements keys and values separation
inspired by the [WiscKey](https://pages.cs.wisc.edu/~ll/papers/wisckey.pdf) paper.
GhalaDb implements a SSD-conscious data layout by decoupling the storage of
keys from values. An in-memory tree stores the keys along with pointers to
the values, while the values are stored in a separate log file.
This significantly reduces write amplification during ingestion,
while facilitating faster data loading.
Since GhalaDb keeps all its keys and data pointers in memory, it is suitable
for applications that have small-sized keys.
<div class="warning">!! GhalaDb is experimental software and might not be suitable for your use case.</div>
```ignore
use ghaladb::{GhalaDb, GhalaDbResult};
fn main() -> GhalaDbResult<()> {
let mut db = GhalaDb::new("/tmp/ghaladb", None)?;
let key = "king".to_owned();
let val = "queen".to_owned();
db.put(&key, &val)?;
assert_eq!(db.get(&key)?.unwrap(), val);
Ok(())
}
```
*/
extern crate log;
pub use crate::;
//
// _| _| _| _|
// _|_|_| _|_|_| _|_|_| _| _|_|_| _|_|_| _|_|_|
//_| _| _| _| _| _| _| _| _| _| _| _| _|
//_| _| _| _| _| _| _| _| _| _| _| _| _|
// _|_|_| _| _| _|_|_| _| _|_|_| _|_|_| _|_|_|
// _|
// _|_|
//