1MONGOC_CLIENT_GET_DATABASE(3) libmongoc 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,
11 const char *name) BSON_GNUC_WARN_UNUSED_RESULT;
12
13 Get a newly allocated mongoc_database_t for the database named name.
14
15 TIP:
16 Databases are automatically created on the MongoDB server upon in‐
17 sertion of the first document into a collection. There is no need to
18 create a database manually.
19
21 • client: A mongoc_client_t.
22
23 • name: The name of the database.
24
26 A newly allocated mongoc_database_t that should be freed with
27 mongoc_database_destroy() when no longer in use.
28
30 MongoDB, Inc
31
33 2017-present, MongoDB, Inc
34
35
36
37
381.24.3 Aug 17, 2023 MONGOC_CLIENT_GET_DATABASE(3)