[−][src]Trait avocado::db::DatabaseExt
Methods augmenting MongoDB ThreadedDatabase
types.
Provided methods
fn existing_collection<T: Doc>(&self) -> Collection<T>
Returns an existing collection without dropping/recreating it.
fn empty_collection<T>(&self) -> Result<Collection<T>> where
T: Doc + BsonSchema,
Uid<T>: BsonSchema,
T: Doc + BsonSchema,
Uid<T>: BsonSchema,
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. Also
creates indexes specified via the T::indexes()
method.
fn empty_collection_novalidate<T: Doc>(&self) -> Result<Collection<T>>
Creates a fresh, empty collection. Drops any existing collection
with the same name. Recreates the collection without the BSON
schema validator. Also creates indexes specified via the T::indexes()
method.
Implementors
impl<T: ThreadedDatabase> DatabaseExt for T
[src]
impl<T: ThreadedDatabase> DatabaseExt for T
fn existing_collection<T: Doc>(&self) -> Collection<T> | [src] |
fn empty_collection<T>(&self) -> Result<Collection<T>> where | [src] |
fn empty_collection_novalidate<T: Doc>(&self) -> Result<Collection<T>> | [src] |