1MONGOC_COLLECTION_COPY(3) MongoDB C Driver MONGOC_COLLECTION_COPY(3)
2
3
4
6 mongoc_collection_copy - mongoc_collection_copy()
7
9 mongoc_collection_t *
10 mongoc_collection_copy (mongoc_collection_t *collection);
11
13 · collection: A mongoc_collection_t.
14
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; use the cloneCollection command for that purpose.
23
25 A newly allocated mongoc_collection_t that should be freed with mon‐
26 goc_collection_destroy() when no longer in use.
27
29 MongoDB, Inc
30
32 2017-present, MongoDB, Inc
33
34
35
36
371.13.1 Jan 24, 2019 MONGOC_COLLECTION_COPY(3)