Struct mongo_driver::database::Database [] [src]

pub struct Database<'a> { /* fields omitted */ }

Provides access to a MongoDB database.

A database instance can be created by calling get_database or take_database on a Client instance.

Methods

impl<'a> Database<'a>
[src]

[src]

[src]

Execute a command on the database. This is performed lazily and therefore requires calling next on the resulting cursor. if your are using a command like find or aggregate command_batch is likely more convenient for you.

[src]

Execute a command on the database and returns a BatchCursor Automates the process of getting the next batch from getMore and parses the batch so only the result documents are returned. I am unsure of the best practices of when to use this or the CRUD function.

[src]

Simplified version of command that returns the first document immediately.

[src]

Create a new collection in this database.

[src]

Borrow a collection

[src]

Take a collection, database is owned by the collection so the collection can easily be passed around

[src]

Get the name of this database.

[src]

This function checks to see if a collection exists on the MongoDB server within database.

Trait Implementations

impl<'a> Drop for Database<'a>
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a> !Send for Database<'a>

impl<'a> !Sync for Database<'a>