1MONGOC_CLIENT_GET_COLLECTION(3)    libmongoc   MONGOC_CLIENT_GET_COLLECTION(3)
2
3
4

NAME

6       mongoc_client_get_collection - mongoc_client_get_collection()
7

SYNOPSIS

9          mongoc_collection_t *
10          mongoc_client_get_collection (mongoc_client_t *client,
11                                        const char *db,
12                                        const char *collection);
13
14       Get a newly allocated mongoc_collection_t for the collection named col‐
15       lection in the database named db.
16
17       TIP:
18          Collections are automatically created on the MongoDB server upon in‐
19          sertion  of the first document. There is no need to create a collec‐
20          tion manually.
21

PARAMETERS

23client: A mongoc_client_t.
24
25db: The name of the database containing the collection.
26
27collection: The name of the collection.
28

RETURNS

30       A newly allocated mongoc_collection_t that should be  freed  with  mon‐
31       goc_collection_destroy() when no longer in use.
32

AUTHOR

34       MongoDB, Inc
35
37       2017-present, MongoDB, Inc
38
39
40
41
421.17.6                           Jun 03, 2021  MONGOC_CLIENT_GET_COLLECTION(3)
Impressum