Module bonsaidb::core::schema[][src]

Expand description

Types for defining database schema.


Types for defining map/reduce-powered Views.


The qualified name of an Api.

A future that resolves to an entry in a NamedCollection.

Retrieves a list of documents from a collection, when awaited. This structure also offers functions to customize the options for the operation.

The owner of a schema item. This should represent the company, group, or individual that created the item in question. This value is used for namespacing. Changing this after values are in use is not supported without manual migrations at this time.

The namespaced name of a Collection.

An error from inserting a CollectionDocument.

A name was unable to e parsed.

Retrieves a list of documents from a collection. This structure also offers functions to customize the options for the operation.

A document’s entry in a View’s mappings.

A key value pair

A schema name. Cloning is inexpensive.

The name of a Schema.

A collection of defined collections and views.

The name of a View.


A reference to a collection that has a unique name view.


A namespaced collection of Document<Self> items and views.

A View for a Collection that stores Serde-compatible documents. The only difference between implmementing this and View is that the map function receives a CollectionDocument instead of a BorrowedDocument.

A convenience trait for easily storing Serde-compatible types in documents.

A default serialization strategy for views. Uses equivalent settings as DefaultSerialization.

A type that can be used as a unique reference for a collection that implements NamedCollection.

A collection with a unique name column.

Functions for creating qualified names

Defines a group of collections that are stored into a single database.

A collection that knows how to serialize and deserialize documents to an associated type.

A View with additional tyes and logic to handle serializing view values.

An lazy index of mapped and/or reduced data from a Collection.

The implementation of Map/Reduce for a View.

Type Definitions

A type alias for the result of ViewSchema::reduce().

A type alias for the result of ViewSchema::map().

A mapped value in a View.

Derive Macros

Derives the bonsaidb::core::schema::Collection trait. #[collection(authority = "Authority", name = "Name", views = [a, b, c])]

Derives the bonsaidb::core::schema::Schema trait. #[schema(name = "Name", authority = "Authority", collections = [A, B, C]), core = bonsaidb::core] authority, collections and core are optional

Derives the bonsaidb::core::schema::View trait. #[view(collection=CollectionType, key=KeyType, value=ValueType, name = "by-name")] name and value are optional