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             BSON_GNUC_WARN_UNUSED_RESULT;
14
15       Get a newly allocated mongoc_collection_t for the collection named col‐
16       lection in the database named db.
17
18       TIP:
19          Collections are automatically created on the MongoDB server upon in‐
20          sertion  of the first document. There is no need to create a collec‐
21          tion manually.
22

PARAMETERS

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

RETURNS

31       A  newly  allocated  mongoc_collection_t  that  should  be  freed  with
32       mongoc_collection_destroy() when no longer in use.
33

AUTHOR

35       MongoDB, Inc
36
38       2017-present, MongoDB, Inc
39
40
41
42
431.23.1                           Oct 20, 2022  MONGOC_CLIENT_GET_COLLECTION(3)
Impressum