Struct polodb_core::db::Collection

source ·
pub struct Collection<'a, T> { /* private fields */ }
Expand description

A wrapper of collection in struct.

All CURD methods can be done through this structure.

It can be used to perform collection-level operations such as CRUD operations.

Implementations§

Return the size of all data in the collection.

Updates up to one document matching query in the collection. documentation for more information on specifying updates.

Updates all documents matching query in the collection. documentation for more information on specifying updates.

Deletes up to one document found matching query.

When query is None, all the data in the collection will be deleted.

The size of data deleted returns.

Inserts doc into the collection.

Inserts the data in docs into the collection.

When query document is passed to the function. The result satisfies the query document.

Return the first element in the collection satisfies the query.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.