1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
use mongodb::{bson::Document, error::Result};
use serde::Serialize;

use crate::Collection;

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