Module bonsaidb_core::schema

source ·
Expand description

Types for defining database schema.

Re-exports

Modules

  • Types for defining map/reduce-powered Views.

Structs

Enums

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

Traits

  • A namespaced collection of Document<Self> items and views.
  • A convenience trait for easily storing Serde-compatible types in documents.
  • 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.

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.
  • Derives the bonsaidb::core::schema::View trait.
  • Derives the bonsaidb::core::schema::ViewSchema trait. #[view_schema(version = 1, policy = Unique, view=ViewType, mapped_key=KeyType<'doc>)]