Enum bonsaidb::AnyDatabase[][src]

pub enum AnyDatabase<B: Backend = NoBackend> {
    Local(ServerDatabase<B>),
    Networked(RemoteDatabase),
}
Expand description

A database connection that can be either from a local server or a server over a network connection.

Variants

Local(ServerDatabase<B>)

Tuple Fields

A local database.

Networked(RemoteDatabase)

Tuple Fields

A networked database accessed with a Client.

Trait Implementations

The AsyncStorageConnection type that is paired with this type.

Returns the StorageConnection implementor that this database belongs to. Read more

Lists executed transactions from this Schema. By default, a maximum of 1000 entries will be returned, but that limit can be overridden by setting result_limit. A hard limit of 100,000 results will be returned. To begin listing after another known transaction_id, pass transaction_id + 1 into starting_id. Read more

Fetches the last transaction id that has been committed, if any.

Compacts the collection to reclaim unused disk space. Read more

Compacts the entire database to reclaim unused disk space. Read more

Compacts the key value store to reclaim unused disk space. Read more

Accesses a collection for the connected Schema.

Initializes View for schema::View V.

Returns the schema for the database.

Applies a Transaction to the Schema. If any operation in the Transaction fails, none of the operations will be applied to the Schema. Read more

Retrieves the document with id stored within the named collection. Read more

Retrieves all documents within the range of ids from the named collection. To retrieve all documents, pass in .. for ids. Read more

Retrieves all headers within the range of ids from the named collection. To retrieve all documents, pass in .. for ids. Read more

Counts the number of documents within the range of ids from the named collection. Read more

Retrieves all documents matching ids from the named collection. Documents that are not found are not returned, but no error will be generated. Read more

Compacts the collection to reclaim unused disk space. Read more

Queries for view entries from the named view. Read more

Queries for view entries from the named view with their source documents. Read more

Reduces the view entries from the named view. Read more

Reduces the view entries from the named view, reducing the values by each unique key. Read more

Deletes all source documents for entries that match within the named view. Read more

Inserts a newly created document into the connected schema::Schema for the Collection C. If id is None a unique id will be generated. If an id is provided and a document already exists with that id, a conflict error will be returned. Read more

Updates an existing document in the connected schema::Schema for the Collection(schema::Collection) C. Upon success, doc.revision will be updated with the new revision. Read more

Overwrites an existing document, or inserts a new document. Upon success, doc.revision will be updated with the new revision information. Read more

Retrieves a stored document from Collection C identified by id. Read more

Retrieves all documents matching ids. Documents that are not found are not returned, but no error will be generated. Read more

Retrieves all documents within the range of ids. To retrieve all documents, pass in .. for ids. Read more

Retrieves all documents within the range of ids. To retrieve all documents, pass in .. for ids. Read more

Counts the number of documents within the range of ids. Read more

Removes a Document from the database. Read more

Queries for view entries matching View(super::AsyncView). Read more

Queries for view entries matching View with their source documents. Read more

Queries for view entries matching View with their source documents, deserialized. Read more

Reduces the view entries matching View. Read more

Reduces the view entries matching View, reducing the values by each unique key. Read more

Deletes all of the documents associated with this view. Read more

Returns the currently authenticated session, if any.

Checks if action is permitted against resource_name.

Checks if action is permitted against resource_name. If permission is denied, returns a PermissionDenied error. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more