Crates.io | GoodSql |
lib.rs | GoodSql |
version | 0.1.1 |
source | src |
created_at | 2023-10-26 18:48:54.949833 |
updated_at | 2023-10-26 20:35:19.199671 |
description | Module help programmers to use sqlite |
homepage | https://t.me/GoodSql |
repository | https://github.com/ArabShadows/GoodSql/ |
max_upload_size | |
id | 1014896 |
size | 5,998 |
Use module
extern crate GoodSql;
use GoodSql::GoodSql;
let path = "database.sqlite";
let conn = SqlGood::new(path).unwrap();
conn.create_table("my_table", "key TEXT, value TEXT").unwrap();
conn.set_key("my_table", "example_key", "example_value").unwrap();
let value = conn.get_key("my_table", "example_key").unwrap();
match value {
Some(v) => println!("Value: {}", v),
None => println!("Key not found"),
}