[][src]Struct mongodb_helper::Database

pub struct Database {
    pub db: Database,
}

Fields

db: Database

Methods

impl Database[src]

pub fn aggregate<R>(
    &self,
    collection: &str,
    pipeline: Vec<Document>,
    options: Option<AggregateOptions>
) -> Result<Vec<R>, DecoderError> where
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn count(
    &self,
    collection: &str,
    filter: Option<Document>,
    options: Option<CountOptions>
) -> Result<i64, DecoderError>
[src]

impl Database[src]

pub fn delete_many(
    &self,
    collection: &str,
    filter: Document,
    write_concern: Option<DeleteOptions>
) -> Result<i64, String>
[src]

impl Database[src]

pub fn find<R>(
    &self,
    collection: &str,
    filter: Option<Document>,
    options: Option<FindOptions>
) -> Result<Vec<R>, String> where
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn find_one<R>(
    &self,
    collection: &str,
    filter: Option<Document>,
    options: Option<FindOneOptions>
) -> Result<Option<R>, String> where
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn find_one_and_delete<R>(
    &self,
    collection: &str,
    filter: Document,
    options: Option<FindOneAndDeleteOptions>
) -> Result<R, String> where
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn find_one_and_update<R>(
    &self,
    collection: &str,
    filter: Document,
    update: Document,
    options: Option<FindOneAndUpdateOptions>
) -> Result<R, String> where
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn insert_many<D, R>(
    &self,
    collection: &str,
    list_document: Vec<D>,
    options: Option<InsertManyOptions>
) -> Result<Vec<R>, String> where
    D: Serialize,
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn insert_one<D, R>(
    &self,
    collection: &str,
    document: D,
    options: Option<InsertOneOptions>
) -> Result<R, String> where
    D: Serialize,
    R: Deserialize<'r>, 
[src]

impl Database[src]

pub fn update_many(
    &self,
    collection: &str,
    filter: Document,
    update: Document,
    options: Option<UpdateOptions>
) -> Result<i64, String>
[src]

Trait Implementations

impl Clone for Database[src]

Auto Trait Implementations

impl !RefUnwindSafe for Database

impl Send for Database

impl Sync for Database

impl Unpin for Database

impl !UnwindSafe for Database

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,