34 releases (6 stable)
new 1.3.1 | Jan 24, 2023 |
---|---|
1.1.0 | Dec 18, 2022 |
0.4.6 | Nov 14, 2022 |
0.1.0 | Jun 18, 2022 |
#181 in Database interfaces
207 downloads per month
34KB
828 lines
DustData
A data concurrency control storage engine to Rustbase
Join our community and chat with other Rust users.
⚠️ Warning
This is a work in progress. The API is not stable yet.
🔗 Contribute
Click here to see how to Contribute
Dependencies
These are dependencies that are required to use the DustData.
How to install
Add the following to your Cargo.toml
:
[dependencies]
dustdata = "1.3.1"
Usage
Initialize a DustData interface.
// DustData Configuration
let config = dustdata::DustDataConfig {
path: std::path::Path::new("./test_data/dustdata").to_path_buf(),
lsm_config: dustdata::LsmConfig {
flush_threshold: dustdata::Size::Megabytes(128),
}
};
let mut dustdata = dustdata::initialize(config);
Insert a data
// ...
// Creating a data
let data = bson::doc! {
"name": "John Doe",
"age": 30,
}
dustdata.insert("key", data);
Getting a data
// ...
let value = dustdata.get("key").unwrap().unwrap();
println!("{:?}", value);
Updating a data
// ...
let data = bson::doc! {
"name": "Joe Mamma",
"age": 42,
}
dustdata.update("key", data);
Deleting a data
// ...
dustdata.delete("key");
To-dos
- Memtable (06/19/22)
- SSTable (08/20/22)
- Snapshots (12/16/22)
Authors
License
Dependencies
~9MB
~143K SLoC