7 releases
0.1.7 | Nov 4, 2024 |
---|---|
0.1.6 | Nov 3, 2024 |
0.1.5 | Oct 27, 2024 |
#769 in Rust patterns
739 downloads per month
27KB
571 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
~20–33MB
~624K SLoC