colon_db-0.1.0 has been yanked.
colonDB | simpleDB with multiple columns support (database file store)
Checkout main folder for simple key value store.
Make sure you clone this repo inside the directory you write in the cargo.toml's [dependencies] simple_db = ...
May still contain issues, havent tested enough.
usage
I suggest typing in the first row, which will be used as headers to find stuff based on column headers, in the .txt file before dealing with data.
[]
= "libtest"
= "0.1.0"
= "2021"
[]
= { = "../../colondb" }
use ColonDB;
Methods:
find save file, or create one
let mut database = find_database;
Make sure to .to_string() input values.
Check example.
add item or row
database.insert_item_into_db;
database.insert_item_into_db;
database.insert_row_into_db;
select a range from the db (0 to total number of rows, vector with column names)
let newdb = database.select_data;
// None on either selects all available range
get item by key, column
println!
delete item, row, column
database.delete_column;
database.delete_item;
database.delete_row;
display database in terminal
newdb.print_database;