tqdb-1.0.6 doesn't have any documentation.
Tiny Query Database (TQDB)
TQDB is a small library for creating a query-able database that is encoded with json.
The library is well tested (~96.30% coverage according to cargo-tarpaulin) and simple to use with the help of macros.
Examples
We can create a database using any type.
use Database;
let db1: = new;
let db2: = from_iter;
;
let db3: = from_iter;
If the type is serializable, we can even save it as json!
use ;
;
use Database;
let db1: = new;
let db2: = from_iter;
let db3: = from_iter;
db1.save_to_file?;
db2.save_to_file?;
db3.save_to_file?;
We can query a database using macros!
We can search a database...
use ;
let db = from_iter;
let found_items = search!;
...search a database (with mutable access)
let found_items_mut1 = search_mut!;
// or
let found_items_mut2 = search!;
...and remove items easily!
let removed_items = remove!;
If you don't want to use the macros, queries can be composed together like so:
use ;
let db = from_iter;
// boring, simple query
db.search;
// cool AND query
db.search;
// cool OR query
db.search;