[][src]Trait avocado::db::DatabaseExt

pub trait DatabaseExt: ThreadedDatabase {
    fn existing_collection<T: Doc>(&self) -> Collection<T> { ... }
fn empty_collection<T: Doc>(&self) -> Result<Collection<T>> { ... }
fn empty_collection_novalidate<T: Doc>(&self) -> Result<Collection<T>> { ... } }

Methods augmenting MongoDB ThreadedDatabase types.

Provided Methods

Returns an existing collection without dropping/recreating it.

Creates a fresh, empty collection. Drops any existing collection with the same name. Recreates the collection with the $jsonSchema validator based on the BsonSchema impl of the document type.

Creates a fresh, empty collection. Drops any existing collection with the same name. Recreates the collection without the BSON schema validator.

Implementors

impl<T: ThreadedDatabase> DatabaseExt for T
[src]