Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rustbase/dustdata
A data concurrency control key-value storage engine to Rustbase
https://github.com/rustbase/dustdata
database nosql rust rustbase storage-engine
Last synced: 1 day ago
JSON representation
A data concurrency control key-value storage engine to Rustbase
- Host: GitHub
- URL: https://github.com/rustbase/dustdata
- Owner: rustbase
- License: mit
- Created: 2022-05-07T13:41:40.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2025-01-22T13:50:26.000Z (22 days ago)
- Last Synced: 2025-01-22T14:27:23.891Z (22 days ago)
- Topics: database, nosql, rust, rustbase, storage-engine
- Language: Rust
- Homepage: https://rustbase-web.vercel.app/dustdata
- Size: 214 KB
- Stars: 37
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![crates.io](https://img.shields.io/crates/v/dustdata?color=EA4342&style=flat-square)](https://crates.io/crates/dustdata)
[![docs.rs](https://img.shields.io/docsrs/dustdata?style=flat-square)](https://docs.rs/dustdata)# DustData
A data concurrency control storage engine to [Rustbase](https://github.com/rustbase/rustbase)Join our [community](https://discord.gg/m5ZzWPumbd) and [chat](https://discord.gg/m5ZzWPumbd) with other Rust users.
# ⚠️ Warning
This is a work in progress. The API is not stable yet.# 🔗 Contribute
[Click here](./CONTRIBUTING.md) to see how to Contribute# How to install
Add the following to your `Cargo.toml`:```toml
[dependencies]
dustdata = "2.0.0-beta.6"
```# Usage
Initialize a new `DustData` instance with the default configuration:
```rust
use dustdata::DustData;let mut dustdata = DustData::new(Default::default()).unwrap();
```## Inserting data into a collection
```rust
#[derive(Serialize, Deserialize, Clone, Debug)]
struct User {
name: String,
age: u32,
}let collection = dustdata.collection::("users");
let user = User {
name: "Pedro".to_string(),
age: 21,
};// Creating a new transaction.
let mut transaction = collection.start_branch();// Inserting the user into the transaction.
transaction.insert("user:1", user);// Committing the transaction.
collection.commit(transaction).unwrap();// Done!
```## Reading data from a collection
```rust
let collection = dustdata.collection::("users").unwrap();let user = collection.get("user:1").unwrap();
```# Authors
| [
@peeeuzin](https://github.com/peeeuzin) |
| :-------------------------------------------------------------------------------------------------------------------: |# License
[MIT License](./LICENSE)