Crates.io | simple_db |
lib.rs | simple_db |
version | 0.1.1 |
source | src |
created_at | 2024-11-29 22:04:52.854469 |
updated_at | 2024-11-29 22:17:07.204333 |
description | simple key value data base |
homepage | https://github.com/AnasDEV2005/brudb |
repository | https://github.com/AnasDEV2005/brudb |
max_upload_size | |
id | 1466089 |
size | 3,875 |
use in main.rs
use simple_db::SimpleDB;
find save file, or create one
let mut database = SimpleDB::find_database("db.txt");
You have to .to_string()
input values.
Check example.
add (key, value) pair
database.insert_into_db(key, value);
get value by id (key)
database.get_value_from_db(key)
delete value by key
database.delete_from_db(key)
to access the data (a hashmap)
database.data //... whatever action