Expand description
Types for defining database schema.
Re-exports§
pub use self::view::map::Map;pub use self::view::map::MappedValue;pub use self::view::map::ViewMappedValue;pub use self::view::CollectionMapReduce;pub use self::view::DefaultViewSerialization;pub use self::view::MapReduce;pub use self::view::ReduceResult;pub use self::view::SerializedView;pub use self::view::View;pub use self::view::ViewMapResult;pub use self::view::ViewSchema;
Modules§
- view
- Types for defining map/reduce-powered
Views.
Structs§
- Async
Entry - A future that resolves to an entry in a
NamedCollection. - Async
List - Retrieves a list of documents from a collection, when awaited. This structure also offers functions to customize the options for the operation.
- Authority
- 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.
- Collection
Name - The namespaced name of a
Collection. - Collection
Summary - A summary of a
Collection. - Insert
Error - An error from inserting a
CollectionDocument. - Invalid
Name Error - A name was unable to e parsed.
- List
- Retrieves a list of documents from a collection. This structure also offers functions to customize the options for the operation.
- Name
- A schema name. Cloning is inexpensive.
- Qualified
Name - A namespaced name.
- Schema
Name - The name of a
Schema. - Schema
Summary - A summary of a
Schema/Schematic. - Schematic
- A collection of defined collections and views.
- View
Name - The name of a
View. - View
Summary - A summary of a
ViewSchema.
Enums§
- Named
Reference - A reference to a collection that has a unique name view.
Traits§
- Collection
- A namespaced collection of
Document<Self>items and views. - Default
Serialization - A convenience trait for easily storing Serde-compatible types in documents.
- Nameable
- A type that can be used as a unique reference for a collection that
implements
NamedCollection. - Named
Collection - A collection with a unique name column.
- Qualified
- Functions for creating qualified names
- Schema
- Defines a group of collections that are stored into a single database.
- Serialized
Collection - A collection that knows how to serialize and deserialize documents to an associated type.
Derive Macros§
- Collection
- Derives the
bonsaidb::core::schema::Collectiontrait.#[collection(authority = "Authority", name = "Name", views = [a, b, c])] - Schema
- Derives the
bonsaidb::core::schema::Schematrait. - View
- Derives the
bonsaidb::core::schema::Viewtrait. - View
Schema - Derives the
bonsaidb::core::schema::ViewSchematrait.#[view_schema(version = 1, policy = Unique, view=ViewType, mapped_key=KeyType<'doc>)]