Crates.io | virvadb |
lib.rs | virvadb |
version | 0.1.1 |
source | src |
created_at | 2023-05-27 19:49:34.918609 |
updated_at | 2023-05-27 19:55:13.965752 |
description | virvadb is a simple data base that save your data into INI file format |
homepage | https://github.com/charleslf2/virvadb |
repository | https://github.com/charleslf2/virvadb |
max_upload_size | |
id | 876085 |
size | 19,330 |
virvadb is a simple data base that save your data into INI file format
I build virvadb primarly for the data driven 2D game engine Im working on right now , as it is more easy to work with INI files. But you can use it for all sort of application.
Create a custom database with any extension e.g (db.mydb, map.data)
CRUD operations
all element are '&str' type
cargo add virvadb
//import virvadb
>>> use virvadb;
// create a new db
>>> let db_path="mydesktop/player.db";
>>> virvadb::new(db_path);
// create data
>>> let player_data=vec![("name","polka"), ("health_point", "14"), ("attack_point","15"), ("level","5")];
>>> virvadb::insert(db_path, &player_data);
// read data
>>> let db=virvadb::get_db(db_path);
>>> let data_position=1;
>>> let player_name=&db[Some(data_position.to_string())]["name"];
>>> println!("the player name is {}", player_name);
// update data
>>> virvadb::update(db_path, &vec![("name", "john")], data_position);
// delete single data
>>> virvadb::delete(db_path, data_position);
// delete all data
>>> virvadb::delete_all(db_path);
[o] Make it fast on data intensive task , like tileset editing (currently very slow)
[o] Protect the database with password
[o] and many more ...
virvadb ❤️ contributor, wait for your pull request.