MCPcopy Create free account

hub / github.com/Owez/tinydb / functions

Functions20 in github.com/Owez/tinydb

↓ 10 callersMethodadd_item
Adds a new item to the in-memory database. If this is the first item added to the database, please ensure it's the only type you'd like to add. Due t
src/lib.rs:236
↓ 2 callersMethodremove_item
Removes an item from the database. See [Database::update_item] if you'd like to update/replace an item easily, rather than individually deleting and
src/lib.rs:268
↓ 1 callersMethodcontains
Searches the database for a specific value. If it does not exist, this method will return [error::DatabaseError::ItemNotFound]. This is a wrapper aro
src/lib.rs:366
↓ 1 callersFunctiondb_dump
()
src/lib.rs:447
↓ 1 callersMethoddump_db
Dumps/saves database to a binary file. # Saving path methods The database will usually save as `\[label\].tinydb` where `\[label\]` is the defined [
src/lib.rs:286
↓ 1 callersFunctionget_stream_from_path
Reads a given path and converts it into a [Vec]<[u8]> stream.
src/lib.rs:393
↓ 1 callersMethodopen_db_path
Opens the path given in [Database::save_path] (or auto-generates a path).
src/lib.rs:371
↓ 1 callersMethodsmart_path_get
Automatically allocates a path for the database if [Database::save_path] is not provided. If it is, this function will simply return it.
src/lib.rs:383
Methodauto_from
Loads database from existant path or creates a new one if it doesn't already exist. This is the recommended way to use TinyDB if you are wanting to e
src/lib.rs:213
Functionauto_from_creation
()
src/lib.rs:546
Functiondb_contains
()
src/lib.rs:532
Functiondb_from
()
src/lib.rs:519
Methodfrom
Creates a database from a `.tinydb` file. This retrives a dump file (saved database) from the path given and loads it as the [Database] structure. #
src/lib.rs:169
Methodfrom
(e: std::io::Error)
src/error.rs:31
Functionitem_add
()
src/lib.rs:419
Functionitem_remove
()
src/lib.rs:432
Methodnew
Creates a new database instance from given parameters. - To add a first item, use [Database::add_item]. - If you'd like to load a dumped database, us
src/lib.rs:121
Methodquery_item
Query the database for a specific item. # Syntax ```none self.query_item(|[p]| [p].[field], [query]); ``` - `[p]` The closure (Will be whatever the
src/lib.rs:327
Functionquery_item_db
()
src/lib.rs:469
Methodupdate_item
Replaces an item inside of the database with another item, used for updating/replacing items easily. [Database::query_item] can be used in conjunctio
src/lib.rs:252