SYNOPSIS
#include <mongoc.h> { mongoc_database_t *database; mongoc_client_t *client; client = mongoc_client_new (uri_string); database = mongoc_client_get_database (client, "db_name"); }
DESCRIPTION
mongoc_database provides access to a MongoDB database. This handle is useful for actions against a particular database object. It isn’t a container for mongoc_collection(7) structures.
READ PREFERENCES & WRITE CONCERNS
Read preferences and write concerns are inherited from the parent client. They can be overridden by set_* commands if so desired.
LIFECYCLE
It is an error to call mongoc_database_destroy(3) on a database that has operations pending. It is required that you release mongoc_cursor(7) structures before calling mongoc_database_destroy(3).
SEE ALSO
FUNCTIONS
mongoc_database_add_user(3) mongoc_database_destroy(3) mongoc_database_command(3) mongoc_database_command_simple(3) mongoc_database_drop(3) mongoc_database_has_collection(3) mongoc_database_get_collection(3) mongoc_database_get_name(3) mongoc_database_get_read_prefs(3) mongoc_database_set_read_prefs(3) mongoc_database_get_write_concern(3) mongoc_database_set_write_concern(3)
AUTHORS
This page was written by MongoDB Inc.