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

Download history 228/week @ 2022-10-08 132/week @ 2022-10-15 46/week @ 2022-10-22 99/week @ 2022-10-29 11/week @ 2022-11-05 36/week @ 2022-11-12 1/week @ 2022-11-19 3/week @ 2022-11-26 34/week @ 2022-12-03 46/week @ 2022-12-10 166/week @ 2022-12-17 22/week @ 2022-12-24 7/week @ 2022-12-31 16/week @ 2023-01-07 86/week @ 2023-01-14 97/week @ 2023-01-21

207 downloads per month

MIT license

34KB
828 lines

crates.io

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

MIT License

Dependencies

~9MB
~143K SLoC