1
2
3
4
5
6
7
8
9
10
11
12
//! Updates multiple documents in a collection by their id field.

use mongodb::{bson::Document, error::Result};

use crate::Collection;

impl<Any> Collection<Any> {
    pub async fn update_many(&self, query: Document, update: Document) -> Result<()> {
        self.collection.update_many(query, update, None).await?;
        Ok(())
    }
}