1MONGOC_COLLECTION_COPY(3)          libmongoc         MONGOC_COLLECTION_COPY(3)
2
3
4

NAME

6       mongoc_collection_copy - mongoc_collection_copy()
7

SYNOPSIS

9          mongoc_collection_t *
10          mongoc_collection_copy (mongoc_collection_t *collection);
11

PARAMETERS

13       · collection: A mongoc_collection_t.
14

DESCRIPTION

16       Performs  a  deep  copy of the collection struct and its configuration.
17       Useful if you intend to call mongoc_collection_set_write_concern,  mon‐
18       goc_collection_set_read_prefs,  or  mongoc_collection_set_read_concern,
19       and want to preserve an unaltered copy of the struct.
20
21       This function does not copy the contents of the collection on the  Mon‐
22       goDB server.
23

RETURNS

25       A  newly  allocated  mongoc_collection_t that should be freed with mon‐
26       goc_collection_destroy() when no longer in use.
27

AUTHOR

29       MongoDB, Inc
30
32       2017-present, MongoDB, Inc
33
34
35
36
371.16.2                           Feb 25, 2020        MONGOC_COLLECTION_COPY(3)
Impressum