simpleDB | key value database file store
Checkout colondb crate for multiple column support.
[!NOTE] The simple_db struct is not the database itself, its just a way to apply changes to the .txt where the database is saved
usage
use SimpleDB;
Methods:
find save file, or create one
let mut database = find_database;
let mut db = database.unwrap; // this or handle the error
You have to .to_string() input values.
Like so:
database.insert_into_db; // add key value pair to database
get value by id (key)
database.get_value_from_db
delete value by key
database.delete_from_db
sort the database
db.sort_by_key;
db.sort_by_value;
to edit the data yourself:
db.data... // the data here is an indexmap of string: string
print db
db.print_db