[][src]Crate tinydb

About

TinyDB or tinydb is a small-footprint, superfast database designed to be used in-memory and easily dumped/retrieved from a file when it's time to save. ✨

Implamentation notes

  • This database does not save 2 duplicated items, either ignoring or raising an error depending on end-user preference.
  • This project is not intended to be used inside of any critical systems due to the nature of dumping/recovery. If you are using this crate as a temporary and in-memory only database, it should preform at a reasonable speed (as it uses HashSet underneath).

Essential operations

Some commonly-used operations for the Database structure.

OperationImplamentation
Create databaseDatabase::new
Create database from fileDatabase::from
Load database or create if non-existantDatabase::auto_from
Query for itemDatabase::query_item
Contains specific itemDatabase::contains
Update/replace itemDatabase::update_item
Delete itemDatabase::remove_item
Get all itemsDatabase::read_db
Dump databaseDatabase::dump_db

Modules

error

Contains various items related to errors inside of TinyDB.

Structs

Database

The primary database structure, allowing storage of a generic type with dumping/saving options avalible.