1MONGOC_CLIENT_GET_DATABASE(3) MongoDB C Driver MONGOC_CLIENT_GET_DATABASE(3)
2
3
4
6 mongoc_client_get_database - mongoc_client_get_database()
7
9 mongoc_database_t *
10 mongoc_client_get_database (mongoc_client_t *client, const char *name);
11
12 Get a newly allocated mongoc_database_t for the database named name.
13
14 TIP:
15 Databases are automatically created on the MongoDB server upon
16 insertion of the first document into a collection. There is no need
17 to create a database manually.
18
20 · client: A mongoc_client_t.
21
22 · name: The name of the database.
23
25 A newly allocated mongoc_database_t that should be freed with mon‐
26 goc_database_destroy() when no longer in use.
27
29 MongoDB, Inc
30
32 2017-present, MongoDB, Inc
33
34
35
36
371.14.0 Feb 22, 2019 MONGOC_CLIENT_GET_DATABASE(3)