[][src]Crate tinydb

About

A small-footprint, superfast database implamentation.

Under the surface, tinydb uses a HashSet-based table that works in a similar fashion to SQL-like/Grid based databases.

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.