Function shared_mongodb::database::get
source · pub async fn get(
data: &Arc<Mutex<ClientHolder>>,
database_name: &str
) -> Result<Database, Box<dyn Error>>
Expand description
Get the handle of the database. If the client is not connected to the MongoDB cluster, establish a new connection and return the handle of the database.
Arguments
data
- A ClinetHolderdatabase_name
- The name of a Database