Answers for "Get a handle to a database in MongoDB deployment"

0

Get a handle to a database in MongoDB deployment

// Get a handle to a database.
let db = client.database("mydb");

// List the names of the collections in that database.
for collection_name in db.list_collection_names(None).await? {
    println!("{}", collection_name);
}
Posted by: Guest on October-05-2021

Code answers related to "Get a handle to a database in MongoDB deployment"

Browse Popular Code Answers by Language