5 releases
new 0.1.5 | Oct 27, 2024 |
---|---|
0.1.3 | Oct 27, 2024 |
0.1.2 | Oct 26, 2024 |
0.1.1 | Oct 25, 2024 |
0.1.0 | Oct 25, 2024 |
#581 in Rust patterns
348 downloads per month
10KB
157 lines
ergokv
ergokv
is a library for easy integration with TiKV, providing derive macros for automatic CRUD operations.
Usage
Add this to your Cargo.toml
:
[dependencies]
ergokv = "0.1"
Then, in your Rust file:
use ergokv::Store;
use serde::{Serialize, Deserialize};
use uuid::Uuid;
#[derive(Store, Serialize, Deserialize)]
struct User {
#[key]
id: Uuid,
#[index]
username: String,
email: String,
}
This will generate load
, save
, delete
, by_username
, set_username
, and set_email
methods for User
.
Dependencies
~19–32MB
~597K SLoC